(No) Compression when exporting to Excel
(No) Compression when exporting to Excel
Hello,
I use the Buttons extension with the Excel export function.
I noticed that the created xlsx file is not compressed, STORE is used as method. This makes the excel file unnecessarily large.
I saw in the documentation of jszip that DEFLATE can also be used: https://stuk.github.io/jszip/documentation/api_jszip/generate_async.html#compression-and-compressionoptions-options
Is there a way to use this parameter or are there reasons why it is not used?
I found a discussion (https://datatables.net/forums/discussion/39534/why-the-excel-size-is-very-large-when-we-export-using-buttons-excel-option) on this, but it's 6 years old.
This question has an accepted answers - jump to answer
Answers
Honestly? I had just assumed that JSZip would compress by default! I never stopped to consider that it didn't. So no, there is no good reason.
I've committed a change to add that now.
Regards,
Allan
Thanks for the quick reply and the change. I tested it and the file size is now only 350kb instead of 4.5MB