Fix quoted commas in a call-center CSV export
Learn why commas inside call-center fields shift CSV columns, how to spot broken quotes, and how to repair and verify the export in your browser.
A call-center export may look fine until a caller’s name or notes contain a comma. Then fields can appear in the wrong columns, or one record can spill into several rows. The comma may be valid data, but the quotation marks around it may be missing or damaged.
Use TooLab’s CSV Editor to inspect the file, find affected values, and check whether the columns line up. If the file itself is malformed, you may need to repair the export or correct its quoting before importing it into another system.
Check the CSV export
- Make a copy of the original export first. Open the copy in the CSV Editor. It runs in your browser and can open CSV files with up to 10 million rows.
- Compare the column headings with a row you know is wrong. Look for a familiar value, such as a caller name or note, and use the editor’s search to find it.
- Check whether the name, phone number, outcome, and notes appear under the right headings. A comma in a caller’s name or notes should not create an extra column.
- If the editor shows the data in the wrong columns, make a note of the affected record and the first place where the columns shift. Do not overwrite your original file while investigating.
- Check the export in the system that will receive it after any repair. A CSV can look correct in one viewer but still be interpreted differently by another app.
A correctly quoted field can contain a comma. For example, Call,"Smith, Jordan",Resolved has three fields, not four. The quotation marks tell a CSV reader to treat the comma between Smith and Jordan as part of the name.
What the result means
The columns line up in the CSV Editor
The file’s commas and quotes are probably being interpreted correctly. The problem may be the receiving app’s import settings, or the app may be treating a different character as the column separator. Try importing a copy and choose comma as the delimiter, the character used to separate columns.
Only rows with commas in a name or note are shifted
Those fields may not be wrapped in quotes. A value like Smith, Jordan needs quotes around the whole field, as in "Smith, Jordan". Without them, a reader can mistake the comma in the value for a column boundary.
A row absorbs later fields or records
An opening quote may have no matching closing quote. A CSV reader can then treat later commas, and sometimes following lines, as part of the same field. A line break inside a quoted field is allowed by CSV, so check the quote pair before assuming every visible line break starts a new record.
Every row has the same number of columns, but the values look wrong
The separator may be the issue instead of quotation marks. Some exports use semicolons or tabs between fields. If all rows are affected in the same way, check the export’s delimiter and the receiving app’s import choice. For a closer explanation of quote handling, see why quotes break CSV imports.
How to fix the export
- Export the file again from the source system. If you can, choose CSV format and enable the option to quote text fields. Re-exporting is safer than repairing many rows by hand because the source system knows which values belong together.
- Quote fields that contain commas. A field such as
Smith, Jordanshould be written as"Smith, Jordan". The quotes go around the entire field, not just around one part of the value. - Double any quote marks inside a quoted field. If a note says
Caller said "call me back", the CSV field should be"Caller said ""call me back""". Two consecutive quote marks represent a quote that belongs in the data. - Keep commas out of unquoted fields. If a note contains a comma, quote the complete note. Do not remove meaningful punctuation from call notes just to make the file import.
- Repair only a small number of known errors by hand. Work on a copy and take care not to change commas or quotation marks in other records. If one record has an unmatched quote, fix that quote pair first, then reopen the file in the CSV Editor to check the columns.
- Check the import delimiter. When all rows shift consistently, set the receiving app to use the same separator as the export. A delimiter mismatch is different from a comma inside a quoted field.
Verify the repaired file
Open the repaired copy in the CSV Editor again. Check the column headings, a row with a comma in a name, and a row with a comma or quotation marks in its notes. Confirm that each value is in the expected column and that the record remains on the expected row.
Then import a copy into the call-center system or workflow that needs the data. Check a few records there too, especially the ones that were wrong before. If the source system keeps producing malformed quotes, contact its administrator or support team and provide a small, non-sensitive example of the problem. Avoid sending caller names, phone numbers, or private call notes when a made-up example can show the issue.
The CSV Editor works with the file in your browser, so the file stays on your device while you inspect it.
