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.
Our worksheet setup is now more aligned to the demo at www.igniteui.com/.../loading-data.
Thank you for posting in the Infragistics community!
I am not sure I understand what you need to achieve completely. I see that you have placed a Spreadsheet on the page, and there is also a workbook defined with JS code, that is visualized by the Spreadsheet.
Do you users need to be able to copy formulas from the Spreadsheet formula bar ? If this is the case, I believe this is currently working fine, which makes me think there is more to your scenario that I am missing. Please provide more details around it in order to make me able to help you.
Looking forward to hearing from you.
Our spreadsheets (to be copied) contain formulas which are not persisted to the columns they appear in. I have enabled the formula bar, but the only way to get the existing formula into the cell is to copy the formula directly (in the formula bar in Excel), one cell at a time. Our customers are expecting to copy thousands of rows at a time for integration into the db.
Thank for explaining your requirement. Currently copying the formula bar directly is not supported.
What you can do to persist the formula bars is a little trick:
1) Copy the formula as plain text wrapped in quotes in the next or another cell in the Spreadsheet. In the example below I use cell C1:
2) Copying/Pasting the second row to Excel will produce what you need:
I believe you should be able to hide/delete the B column before copying or after pasting so that to keep the original structure of your spreadsheet.
Please let me know if you have further questions, I will be glad to help.
You can also populate the C1 cell via code, if you need any assistance how to do that please let us know.
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.