Summary: | Corrupted styles.xml for file created with XSSFWorkbook | ||
---|---|---|---|
Product: | POI | Reporter: | findbastien |
Component: | XSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tienduong.nk |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Bug Depends on: | 55800 | ||
Bug Blocks: | |||
Attachments: |
Test case see Main.java
Narrowed down to bare minimum required code |
Created attachment 33108 [details]
Narrowed down to bare minimum required code
I worked a bit on reproducing this, the attached unit-test suffices to get an invalid document, it seems the StylesTable that POI writes out is not fully correct here.
*** Bug 55800 has been marked as a duplicate of this bug. *** |
Created attachment 32862 [details] Test case see Main.java In attachment a test case for this bug (see Main.java) Basically : 1) I create a "reference" Workbook from a file "template.xlsx" that contains only 1 custom style; 2) I create a "target" Workbook (empty) 3) I copy the custom style from the "reference" workbook to the "target" workbook 4) I create one cell with the custom style 5) I output the target Workbook to a file 6) I close everyting and open the output file with Excel and I get an error about "styles.xml" corrupted For some custom the style in "template.xlsx" I can get a output file without error, but with the one in the attached zip, it fails everytimes.