I thought there were two ways to do this: either enclose the field containing the comma in quotes, or place a backslash before the comma. However neither of these is working; when I load up the CSV file into OpenOffice Calc, LibreOffice Calc, or Microsoft Excel, the comma is treated like a field delimiter and my field is split in two, breaking the layout. What am I doing wrong?
1 Answer
Try authoring the data in Calc or Excel and then save/export it as CSV. What does it produce when you view the CSV in a plaintext editor?
In my testing with Excel, I see it encloses the field with the comma in double quotes and correctly interprets it when I re-epen it.
When you edit the data in a plaintext editor, make sure you're using regular double quotes ("
) and not so-called smart quotes (“”
).
TextQualifier
properly set in your viewing program?