-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created XLSX compression #220
Comments
I could guess it's concerned with Shared String Table (ISO/IEC 29500-1 specification, p.18.4). In than case devs just should implement that mechanism in js-xlsx. |
Tried it with and without SST (bookSST true/false), no change |
@SzaboAdamImre @Siri0n the zip library is not compressing (it is storing the files as plaintext rather than using the DEFLATE algorithm). That option needs to be made available to the write functions |
@SheetJSDev |
@SzaboAdamImre Did you ever figure out how to compress your file? I am running into the same exact problem. Thanks. |
@SzaboAdamImre @Siri0n @SheetJSDev I created a pull request which will give us the ability to add a compression option. Example usage: If you don't want to wait for the next version commit then just edit your xlsx.js file and replace the write_zip_type function with the updated one:
|
@bchr02 So many thanks, this is great! |
Hi All, Please let me know whether this issue is fixed? |
@gtskaushik it's not enabled by default, you have to pass the var wopts = {bookType: 'xlsx', bookSST: true, compression:true};
var binary = XLSX.write(workbook, wopts); |
@reviewher Thanks for the immediate reply. I'm already using this library with compression option. But still the size is 30 MB. But when I open the file in Microsoft Excel and save it again , it becomes 6 MB |
@gtskaushik can you share the code that generated the file? |
var wb = new Workbook()
|
@gtskaushik hello, got the same problem, did you fix this issue? many thanks:) |
Same Problem Here.File Size is large on download but on resaving, the size of the file reduces.Please share the solution for this if anyone has come up with one |
- README and example cleanup - basic XLSB and ODS write support - flow typecheck for ODS file Note: xlsx.js flow fails: facebook/flow#380 - exposed jszip compression (fixes SheetJS#220, closes SheetJS#284) README issues: | id | author | comment | |-----:|:---------------|:---------------------------------------------| | SheetJS#202 | @sao93859 | closes SheetJS#202 | | SheetJS#211 | @alexanderchan | closes SheetJS#211 corrected examples | | SheetJS#327 | @cskaandorp | changed saveAs example to match write tests | | SheetJS#424 | @dskrvk | added note about s2roa h/t @LeonardoPatignio | | SheetJS#496 | @jimmywarting | closes SheetJS#496 adapted rABS examples with rAAS | ODS file format issues: | id | author | comment | |-----:|:---------------|:---------------------------------------------| | protobi#148 | @user4815162342| closes protobi#148 h/t @ziacik | | protobi#166 | @paulproteus | closes protobi#166 rudimentary ODS write support | | protobi#177 | @ziacik | closes protobi#177 | | protobi#179 | @ziacik | closes protobi#179 use JSON when available | | SheetJS#317 | @ziacik | closes SheetJS#317 | | SheetJS#328 | @think01 | closes SheetJS#328 | | SheetJS#383 | @mdamt | closes SheetJS#383 duplicate cells should be copied | | SheetJS#430 | @RB-Lab | closes SheetJS#430 | | SheetJS#546 | @lgodard | closes SheetJS#546 thanks to other changes |
Hello!
I might be missing some functionality here, but I can't enable the compression on the files...
I'm using the node version of this library (https://www.npmjs.com/package/xlsx) to convert some server side data to XLSX, and serve it as downloadable file (without saving the file itself on the server side). The code I'm using:
(the callback function is a HAPI reply function)
This code works fine, the xlsx is available for download, and the data is correct.
The problem is that the file size is too big...
F.E a downloaded file is 1,3 MB.
I open that file in Excel, modify a small detail (f.e. modify a number), and the file size becomes 153 KB.
I have reproduced this with LibreOffice, and with the writeFile function as well.
What am I missing?
Thx in advance
The text was updated successfully, but these errors were encountered: