OpenOffice Calc: reduce file size when saving as Excel
Solution 1:
I found the problem. There were 4 x 65536 (mainly unused) rows with a custom row height. I selected all unused rows, invoked Format > Row > Optimal Height and pressed OK. This shrinked the file from 5 MB to 10 k.
For discovering this I saved the file as .xlsx (Excel 2007/2010 XML or as OfficeOpen XML Spreadsheet, makes no difference). This is a zip format containing xml files. I unzipped it and found huge files like xl/worksheets/sheet2.xml
. I formatted one of them using xmllint --format
and found 65536 lines looking like <row collapsed="false" customFormat="false" customHeight="true" hidden="false" ht="12.8" outlineLevel="0" r="65536"/>
.