Data files
Why a comma can break a CSV import
Understand quoted fields before changing the data.
In a comma-separated file, a comma usually separates columns. But a comma can also belong inside a value. Quoting tells the reader which meaning to use.
A value containing a comma
This invented row has three columns:
item,description,quantity
A12,"Notebook, blue",2
The description is Notebook, blue. Without the surrounding double quotes, a simple CSV reader would see an extra field.
A quote inside a quoted value
In the common CSV convention documented by RFC 4180, a double quote inside a quoted field is written twice:
item,description,quantity
A12,"Notebook marked ""sample""",2
The description becomes Notebook marked "sample". Quoted fields can also contain line breaks, so one visible line in a text editor is not always one complete record.
Check the importer first
Use the import preview to confirm the delimiter, text encoding, quote handling, and column count. Files called CSV sometimes use semicolons or tabs. Changing all commas to another character can damage the actual values.
Keep an untouched original and test a few representative rows. If you generate CSV in code, use a CSV writer that handles quoting rather than joining arbitrary values with commas.
A file can be structurally readable and still contain the wrong data types or missing values. After import, compare sample values with the original and check the total record count.