google / google-visualization-issues

288 stars 35 forks source link

dataTableToCsv output format: can I control it? #2554

Open AppLEaDaY opened 7 years ago

AppLEaDaY commented 7 years ago

I notice dataTableToCsv produces an output where columns values in the same row are separated with commas. As a result, when somebody opens the csv file with Microsoft Excel columns are not recognized automatically as I could see with LibreOffice Calc. I saw in order to see Microsoft Excel automatically find the columns semicolons instead of commas are needed. Is there a way to tell dataTableToCsv to use semicolons instead of commas?

Thanks in advance! :-)

A.

dlaliberte commented 7 years ago

dataTableToCsv escapes any commas embedded in the data values by quoting the whole value, to avoid confusion with the comma separator. There is not a way to specify an alternative separator. You'd have to convert the csv file to another format outside of Google Charts.

While commas and double quotes are handled correctly, I notice that newlines (\n) are not.