News for hackers. Stuff that matters.
Re:A love letter to the CSV format by simonw on Wednesday March 26, 2025 @07:23PM (#43488669)
Almost, except the way Excel-style quoting works with newlines sucks - you end up with rows that span multiple lines, so you can't split on newline to get individual rows.

With JSON those new lines are \n characters which are much easier to work with.

Re:A love letter to the CSV format by magicalhippo on Thursday March 27, 2025 @12:55AM (#43490499)
I ended up parsing the XML format instead of the CSV format when handling paste from Excel due to the newlines issue.

CSV seemed so simple but after numerous issues, a cell with both newline and " made me realize I should keep the little hair I had left and put in the work to parse the XML.

It's not great either, with all its weird tags, but at least it's possible to parse reliably.