AnsweredAssumed Answered

Handling 'comma' in the data while writing to a CSV

Question asked by Krupa.r on Mar 15, 2016
Latest reply on Mar 15, 2016 by gcubed

Hello All,

 

I wrote a gel script to create a CSV file which uses 'comma' as delimiter. This file will then be saved in a custom object through xog for the users to access. So, the output should be 'pretty' (data displayed in separate columns). All is well but data splits when there is a 'comma' within the data. I used other delimiters (tab, pipe and caret) to generate the CSV file  but the output by default isn't well formatted unless I change the excel delimiter setting in my local machine. (http://www.howtogeek.com/howto/21456/export-or-save-excel-files-with-pipe-or-other-delimiters-instead-of-commas/)

 

Is there a way to escape 'comma' in the data while writing to a CSV with delimiter as 'comma'?

or is there a way to display formatted output while using other delimiters?

 

 

I am sure there must be way already. Thanks in Advance.

Outcomes