Is there any way to put commas in csv file.
I've got a two column CSV with a name and a number. Some people's name use commas, for example "Joe Blow, CFA." This comma breaks the entire CSV format.
How to handle this type of cases?Any alternative is there? Please let me know.
Is there a way to include commas in CSV columns without brea
Moderator: General Moderators
-
vinodkumar
- Forum Newbie
- Posts: 4
- Joined: Thu May 29, 2014 12:15 am
Re: Is there a way to include commas in CSV columns without
Moved because this has nothing to do with Linux.
Wrapping your columns in quotes should prevent problems caused by commas in your values. You could also use a different separator.
Wrapping your columns in quotes should prevent problems caused by commas in your values. You could also use a different separator.
Re: Is there a way to include commas in CSV columns without
Re: escaping: The standardized practice is to escape double quotes with double-double quotes:
42,"Joe ""The Blowman"" Blow, CFA.",100.0
http://www.ietf.org/rfc/rfc4180.txt, search for "double quotes"
42,"Joe ""The Blowman"" Blow, CFA.",100.0
http://www.ietf.org/rfc/rfc4180.txt, search for "double quotes"
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Is there a way to include commas in CSV columns without
If you're writing the CSV using PHP then use fputcsv, which will deal with the quote thing for you.
Re: Is there a way to include commas in CSV columns without
I am not sure if there is any way to use commas in a csv file.
Tayla the great