(No) Compression when exporting to Excel

(No) Compression when exporting to Excel

berndy2001berndy2001 Posts: 7Questions: 2Answers: 0
edited June 2022 in Free community support

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

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin
    Answer ✓

    Is there a way to use this parameter or are there reasons why it is not used?

    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

  • berndy2001berndy2001 Posts: 7Questions: 2Answers: 0

    Thanks for the quick reply and the change. I tested it and the file size is now only 350kb instead of 4.5MB

Sign In or Register to comment.