1

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?

4
  • Please post a sample of your data that is not being imported as you expect. Jul 13, 2020 at 19:31
  • To create a .csv file, I ususally edit it in Notepad or Notepad Plus.
    – vssher
    Jul 13, 2020 at 20:00
  • What does this mean when I load up the CSV file...? There are various ways to do that. Have you checked the content of the CSV file in a text editor (Notepad or Notepad++)? Post a text example of what that looks like. Do you have the TextQualifier properly set in your viewing program? Jul 13, 2020 at 20:45
  • Last week, I posted an answer to a similar question at stackoverflow.com/questions/62765982/….
    – Jim K
    Jul 14, 2020 at 18:22

1 Answer 1

1

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 (“”).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .