qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
18.28k stars 1.71k forks source link

File not compressed? Xlsx 50 Mb to 1.5mb #1142

Closed IAkumaI closed 1 year ago

IAkumaI commented 2 years ago

I create file with stream writer. Nothing special, just text (file attached). File has size ~50Mb. But if I open it and save via Excel/Numbers to same xlsx format - file size will be 1.5 Mb.

Why there is so large difference?

File created by exelize (just in zip for github): treolink.ru.xlsx.zip

File open&exported via Numbers: treolink--2.xlsx

xuri commented 2 years ago

Thanks for your issue. For faster generate speed and lower memory usage, the non-numeric type cell value won't be stored as a shared string in streaming mode currently. If you want to get a smaller size for generating spreadsheet files, please use the normal mode functions, such as SetSheetRow or SetCellValue, please also reference pull request #1123.

xuri commented 1 year ago

I'll close this issue, if you have any questions, please let me know to reopen this anytime.