-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broken xlsx using conditional formatting... #402
Comments
I can confirm that it does happen with 2.5.1 version. |
I'm using 2.5.2 and also experiencing this issue. I've even tried only having NPOI touch a plain, data only sheet, but it seems the corruption occurs even the sheet elsewhere uses conditional formatting. Unfortunate that this is a blocking issue for us. |
@RomeoDev777 @nitz Please provide your original Excel files. Although you are all complaining the conditional formatting, the issue you encountered may be different. I can only figure this out by the Excel file. |
Good point! I've attached files here to demonstrate the issue.
The code that modifies the file for this test was run from LINQPad 6, using NPOI 2.5.2 from NuGet. Let me know if any other information would be useful! Attachments |
@nitz After some iinvestigation, your issue is caused by fileRecoveryPr appears after ExtLst. This is not allowed. |
Awesome, thanks so much for looking into this! Hope you're well. |
@tonyqus Thanks in advance. |
Sorry, the issues from you and @nitz are mixed in this issue. I'm reopening the issue |
@FlauzerOriginal I had a quick test based on NPOI 2.5.3. The file is fine (not broken). I don't see any conditional formatting lost. Can you test on your side again? If you see some error, please let me know your CultureInfo. It may be caused by different culture formatting. |
@tonyqus Awesome, that's great news. I try to test (within a few days) and let you know about it, thanks so much. |
HI,
i am using version 2.5.1. With NPOI, i obtain a corrupted or broken xlsx.
This test file was reduced as it had more than one sheet in production..., but even with only one sheet, it doesn't work.
It uses the "conditional formatting".
You can try by simply opening and saving the file
ERRORE.xlsx
XSSFWorkbook workbook = new XSSFWorkbook(FileStream); _sheet = workbook.GetSheetAt(0)
and simply save this
_sheet.Workbook.Write(FileStream);
Any hints ?
Thanks in advance.
ps. the same with v2.4.1
The text was updated successfully, but these errors were encountered: