8 ms·
I think you need to be careful with choosing to use CSV format. CSV works fine as long as you are not handling character stings. Character strings get messy as
by barbegal 6y ago
I think you need to be careful with choosing to use CSV format.
CSV works fine as long as you are not handling character stings. Character strings get messy as soon as they might introduce commas or characters outside of ASCII.
For tabular data which has character strings I prefer to used the ODF format http://opendocumentformat.org/developers/ http://opendocumentformat.org/developers/ (.ods file extension) which has good import and export capabilities from Excel, or Google sheets. If the user needs the data in CSV for entry into another application then they can convert within Excel and handle any conversion problems themselves.
- guerby 6y agoDo you have a preferred library for python for example)? Debian packages python3-odf and https://github.com/eea/odfpy https://github.com/eea/odfpy seems to still have some activity (vs the other listed).
- barbegal 6y agoI don't. In the past I have just used an XML and a zip library like this article explains https://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c16311/How-to-Read-and-Write-ODFODS-Files-OpenDocument-Spreadsheets.htm https://www.codeguru.com/csharp/csharp/cs_data/xml/article.p...
- shrimp_emoji 6y agohttps://docs.python.org/3/library/csv.html https://docs.python.org/3/library/csv.html ? :o