Formulae not retained on export
See original GitHub issueWhen a worksheet has cells with valid .f
properties (formula), the value is not retained during exporting to XLSX format via:
var workbook = workbook = Xlsx.readFile('OnDemand.xlsx', {
cellFormula: true,
cellStyles: true,
sheetStubs: true,
cellNF: true,
bookDeps: true
});
var out = Xlsx.write( workbook, { bookType: 'xlsx', /*bookSST: true,*/ type: 'binary' });
I need to support such functionality for the modification of templated workbooks. For example, the template has a cell, Q16 with the formula =IF(ISERROR((N16*M16*R16)/101.8),0,((N16*M16*R16)/101.8))
. When output via the above code, the value “0” is produced instead.
No formula information is retained, and the cell is a “General” cell of value “0”. Is there a workaround or solution to this?
Issue Analytics
- State:
- Created 9 years ago
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Formulas are not working after exporting to Excel
Answer: · Open the exported report file in Microsoft Excel. · Highlight the column in which to use the formula. · Select Data,...
Read more >Excel formatting and features that are not transferred to other ...
To preserve the formulas if you reopen the file in Excel, select the Delimited option in the Text Import Wizard, and select tab...
Read more >Keep formulas when export Excel- FineReport Help Document
1) Save the report, click the pagination preview, and after querying the data, click Export button in the toolbar, and choose Unaltered Export...
Read more >Excel exports / copies don't retain formulas - Adagio Accounting ...
When I export anything to Excel the formulas all stay, but then when I try to copy that spreadsheet anywhere I get an...
Read more >My export to excel is not retaining the designated column ...
Hi, I've created an excel sheet that contains numeric values and monetary values. Initially, whenever I export the data to a .xlsx file....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any update on when formulas will be supported or at least the xlsx patch from @mcsf will be merged?
We finally settled on a convention: for non-array formulae just setting the
f
key will export the formula. For array formulae, set the topleft corner cell’sF
key to the array formula range. This works for range as well as point array formulae.We updated the write test with an example