Is there a LaTeX package, which would import data from csv
and honour the quotation escaping?
To be exact I mean one using the rules 1. - 7. of https://www.rfc-editor.org/rfc/rfc4180#section-2
Neither pgfplotstable
nor simplecsv
seem to work - they both incorrectly parse the quoted comma as field separator.
column1, column2
value,"A quoted, value"
value2,A value
value3,"a ""value"""
Line 1 (of data) results in a pgfplotstable
error: Table 'data.csv' appears to have too many column
. Header, lines 2 and 3 render fine.
Desired output is:
column1 | column2
---------+---------------------
value | A quoted, value
value2 | A value
value3 | a "value"
The only solution I found is manually enclosing the fields with {}
brackets, but it's obviously a hassle.
EDIT: in the original file only the fields that contain commas and quotes are quoted
EDIT2: I understand it might be complicated to change the quotations to proper '' `` pairs; I'm not interested in this.
"
and join the resulting columns? I mean are there always commas present inside the quotes?datatool
package. It parses the data correctlypgfplotstable
.