Formula openxml gets corrupted after opened and saved by NPOI 2.7.0
Quark321 opened this issue · comments
NPOI Version
2.7.0
File Type
- XLSX
- XLS
- DOCX
- [x ] XLSM
- OTHER
Upload the Excel File
I cannot upload file as it is my company IP
Reproduce Steps
After update to 2.7.0 from 2.6.2 the same file gives the corrupted file error after the file is opened and saved by NPOI.
error805920_01.xmlIssue Description
After downgrade to 2.6.2 it works as expected.
I was not able to indentify cells or formulas affected apart the log file I have added
Fixed in #1291
@Quark321 Without the original Excel file, it's very hard to figure out what the issue is.
@Quark321 Without the original Excel file, it's very hard to figure out what the issue is.
Hi Tony,
Unfortunately I can't share the file as macros and data are IP of the company. To be honest I am not a familiar with the OpenXML format but if you navigate me to the required xml nodes within the excel file, I can review those and share only affected fragments.
We are encountering the same issue.
We set "SUM(A1:A2)" at position A3, "SUM(B1:B2)" at position B3, and "SUM(C1:C2)" at position C3 in sheet 3, and use it as a template.
Then, we use NPOI to write data to sheet1 and sheet2, instead of sheet 3. The exported Excel file ends up having a corrupted /xl/calcChain.xml. Additionally, the formula in the C3 column of sheet 3 is lost.
Can you guys reproduce this issue with 2.6.2?
@Bykiev
This issue does not occur in 2.6.2. It only occurs in 2.7.0.
Can you please check with main branch?
I think it can be a regression bug. But I need an original Excel to help reproduce this and figure out what's changed.
template.xlsx
@tonyqus
Hi, maybe you can try this template, sheet3 have "SUM" formula.