Some ods files saved as csv are much bigger, some smaller. Why?

LibreOffice Calc version 4.2.1.1

Sample file sizes in kb

  • ODS>CSV
  • 292>732
  • 292>157
  • 125>160
  • 115>157
  • 100>14
  • 61>3
  • 17>8
    You get the picture.

How can I get consistently smaller CSV files?

CSV files only save the data. You can’t save formats, fonts or charts. If you have calculations usually CSV will only save the results (there is a workaround to save formulas but it is not usual)

Therefore the information stored in a CSV is much smaller than in a ODS (or any spreadsheet file format)

If all you need to save are the values, then CSV is the best choice for you (and it has the advantage that it can be opened in ANY spreadsheet on any OS)

Then why did one 292KB ODS file become a 732 CSV file, while another turned into a 157KB CSV file? (See original question.)

@chiropterist: This means that at that size the amount of data you have in the file is less relevant than the formatting information stored in the ODS. Try loading your 732Kb CSV data into an ODS and then once save it without any formatting (don’t even adjust column width) and on a second run add bold to titles, change font size, column width, cell colours, etc. File size should be quite different…

(there is a workaround to save formulas but it is not usual) Really? In a csv file? I don’t know how. Can you tell us more?

@webmayo, “Can you tell us more?” tells me you are being sarcastic. You are so smart that I’m sure you can find the answer by yourself. Have fun!

I think the difference is that ODS are compressed files (zip) and CSV are plain text files. So with the same data is reasonable that ODS are smaller than CSV.

Then why did one 292KB ODS file become a 732 CSV file, while another turned into a 157KB CSV file? (See original question.)