spreadsheet
spreadsheet copied to clipboard
Spreadsheet writes corrupted Excel files
Originally by wuuemm
Under some circimstances, write()
method creates files, which MS Excel cannot read and wants to repair. If repaired, those files usually lack formatting and the last row.
This happens, when the Spreadsheet was created by reading an existing Excel file. No problems I faced, when the spreadsheet (and underlying Workbook) was created from the scratch.
The issue must be related to styling in some way. If no styles are applied, everything works well.
What MS Escel usually reports after repair is that <removedPart>
is /xl/styles.xml with an XML error
.
No exceptions are thrown when writing.
What's interesting, Mac OSX's Preview can read the file without problems and shows it properly. MS Excel cannot, though.
This seems to be not related to particular Excel version (Mac, Windows)
Imported from https://dev.vaadin.com/ issue #17973