Apparently CSV is actually quite hard to parse.
Apparently CSV is actually quite hard to parse.
If you are including CSV functionality in something you work on, please read and follow this (tiny) spec!
A bigger issue is that Excel tends to write large numbers in scientific notation, which is a common issue handling price lists. E.g. it'll turn EAN numbers into 6.2134e+11, losing most of the number. Then you have to go back to the XLS file and change the column type into text and exporting it again as CSV. As this is lossy you can't fix it when receiving such a file.
Something like the SQL Server Import/Export Wizard but being able to write SQLite files would be very handy.
It is fixed now... but I'm now wondering whether SQLite wasn't more correct in the first place...
Are you sure it wasn't an injection attempt of some kind?
But more likely is twisted creativity. It seems that some businesses are still using ancient systems, based on COBOL, AS/400, etc. There's resistance to changing legacy code. So when business changes require additional data fields, fields sometimes get subdivided. So a field that originally contained stuff like |foo| now contains stuff like |"foo","bar,baz"| or whatever. That works, because there's nothing like CSV in the data system. But when someone tries a CSV export, you get garbage.
When sharing tabular data in text format, he always preferred TSV because commas were everywhere in the material we were working with, but tab characters were really rare.
Is there a reason why nobody uses these? Did someone work out back in the 90s they were pure evil and we've just never used them since?
There is an excellent description in "C Programmer's Guide to Serial Communications" by Joe Campbell.
Those codes were originally for just such a purpose, but as others point out there was a bootstrapping problem. At this point, if Excel doesn’t support it, it’s not going to gain traction.
So yes, TSV. However, I've seen TSV with spurious tabs :(
Sometimes I ended up pushing for |-delimited data. Or even fixed-width format :)
But one can usually work around this.
I made the mistake once and learned.