Improved CSV for spreadsheets

I often come across data in CSV files that looks numeric in some cells, but is actually codes of some sort… And if it has leading zeros, both Excel and LibreCalc will remove the leading zeros. CAGE codes for example have leading zeros.

Both Excel and Calc honor the =“003” construct, which will preserve the leading zeros and treat the value as a string rather than a number.

Wondered if it would be worthwhile to propose an enhancement request for “encoding/csv” to support this feature that goes beyond RFC 4180, but is well supported by spreadsheet tools.

Any thoughts on this?

A csv is a simple data format.
Blame on Excel to treat it otherwise, and try to implement 5 digit numbers as dates! Blame on LibreOffice to mimic it!

If you want to write a file to be read by Excel, use .ods!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.