dhatim / fastexcel

Generate and read big Excel files quickly
Other
647 stars 116 forks source link

Generated files are marked as corrupt for Excel and LibreOffice #326

Closed alejandrolorefice closed 10 months ago

alejandrolorefice commented 10 months ago

After exporting some files using the library we noticed that the files worked just fine on Numbers and Google Sheets but failed due to "corrupt file" on Excel and LibreOffice.

We did some comparisons between the XML files of the XLSX files that worked on every app generated directly with Apache POI and the ones generated by FastExcel and realised that the main difference was that the files having their [Content_type] file declaring standalone="yes" were failing while the others not.

When we manually switched it to "no" the files started working again in all apps. Is there a reason for hardcoding standalone="yes" when writing the Content_type file instead of relying on XML's default "no"? Do you think it's reasonable to at least allow customising this behaviour?