I've looked and not found an answer to this yet. I assume the functionality is available right now, though, given the blog from 7 years ago about copy and pasting from Excel.
We have clients who frequently change the formulas they use to calculate quantities and costs based on those quantities, so it's imperative that the formula persist during a copy from their working sheets.
**EDIT**
Our worksheet setup is now more aligned to the demo at www.igniteui.com/.../loading-data.
Actually, that's exactly what we're doing. We have a separate screen that users can input formulas (using keys to represent columns), searchable by specific criterion. It can be a bit of a logic nightmare, trying to catch the hierarchy of all combinations of such criterion, but now we calculate using the correct formula upon reload of the igGrid object (after they've copy/paste/save all the values from their Excel sheet to the backend DB.
i'm happy to assist anyone else running into similar issues in this way. Our implementation populates the formula in the formula bar and is almost entirely Razor/Ignite based.
What about calculating formula in some area and then copy it's image to the Excel sheet using some tools if it's possible!
Hi Chris,
I did not mean modifying a formula in advance and pasting it as plain text.
What I meant is to dedicate a new column, where the formula that you have pasted, will be converted to plain text automatically.
Let's say that you paste a formula in C34, in D34 we will see the formula from C34 as plain text, wrapped in quotes. To achieve this, we need to put the following formula in D34:
=CHAR(34) & FORMULATEXT(C34) & CHAR(34)
(If you need this formula above on many rows, let's say 1 to 100, this should be either prepared in advance, so that each new row contains the corresponding index, or resolved programmatically. I will check further if this is feasible and update you)
Of course, you should be able to copy this formula along all rows, and the
Once that you copy the whole worksheet and paste in Excel, you will receive the expected output in cell D34. It is inconvenient that cell C34 will be of no use to you in excel, so you can delete it (the whole column).
Does this makes more sense now ? If you do think I still miss something from your scenario, please let me know so that I can further consider another programmatic solution.
Hristo
This doesn't solve my issues. I need to be able to paste a formula (or group of formulas) without modifying it before copy. Having it copy as plain text also breaks the formulas since they're based on the row they start in, and in plain text, they don't convert to the residing row. For instance, a formula may appear on row 34 in your source sheet, but since it's pasted as plain text, it doesn't compensate for being pasted to row 400 and will not represent the values of row 400 accurately.
I tried catching the paste event in order to apply the jQuery "applyFormula" function, but I couldn't get anything from it. I'm building based on the example at https://www.igniteui.com/spreadsheet/loading-data. Could you give a sample function that actually works to catch the paste action and apply the "applyFormula" function to values being pasted.
You can also populate the C1 cell via code, if you need any assistance how to do that please let us know.