A row containing a customer’s address suddenly spreads across too many columns. A note appears on a line of its own. Someone suggests deleting the commas or replacing every line break. That may make an import stop complaining, but it can also destroy the very information the file was supposed to carry.

CSV is text with structural rules. A comma can separate fields or belong inside a field, depending on quoting. A line break can end a record or be part of a quoted note. Diagnose which role the character is playing before changing it.

Read one record as a parser would

RFC 4180 documents a commonly used CSV convention, including quoted commas, quoted line breaks and doubled quotation marks. It is an Informational RFC, not proof that every application exports the same dialect. Nevertheless, its rules provide a concrete starting point for understanding a broken comma-delimited file.

Consider three fields named Company, Contact and Note. A company name containing a comma needs a quoted field. Quotation marks inside that quoted content are doubled. The following example represents one data record, despite containing punctuation that would be ambiguous without those rules:

Company,Contact,Note
"North, West Studio",Ada,"Asked for ""blue"" paper"

The first field is North, West Studio. The last field contains the word blue inside ordinary quotation marks. A naive operation that splits the text at every comma will misunderstand this record. Removing the punctuation would change the customer’s information rather than repair the parser.

A visible line is not always a complete row

A quoted field can contain a line break. For example, a delivery instruction might contain a first line for an entrance and a second line for a reception desk. A text editor shows several lines, but the CSV record remains open until the closing quote. Counting physical lines therefore does not necessarily give you the number of data rows.

If an import reports an inconsistent field count, inspect the record before the point where the problem becomes visible. An unclosed quote can cause later lines to be absorbed into the same field. Conversely, a program that ignores quoting can mistake a legitimate multiline note for an extra record. The apparent location of the failure is not always where the malformed character originated.

Separate format errors from import settings

A file can be valid for one delimiter convention and unsuitable for another. Some exports use semicolons or tabs. Handyfold’s CSV tools expect comma-delimited UTF-8 text with one nonempty, unique header per column. Renaming a tab-delimited file to .csv does not convert the delimiters, and pasting a semicolon export will not magically create comma-separated columns.

The Microsoft text-import documentation explains that importing text involves choices about interpretation. Use an import preview when available. Check the delimiter, encoding and data types before accepting the result. If names display as garbled characters, investigate encoding rather than indiscriminately editing the spelling of the source data.

Also distinguish a header problem from a quoting problem. Two columns both called Amount may be understandable to a person reading their positions, but they are ambiguous to a tool that asks for a column by name. Rename them meaningfully in a controlled working copy, such as AmountNet and AmountTax, and record what each represents.

Make a small reproduction before the large repair

Copy the header and one troublesome record into a separate sample. Include a quoted comma, an embedded quotation mark and a multiline value if the real export uses them. Open CSV column organizer, paste the sample and request two columns in a changed order. Inspect whether the output retains the exact content of those fields.

For the tool’s built-in sample, selecting Person,Team should put those headers first and produce Ada,Design as the first data row. That verifies the simple operation. Your reduced sample then checks the feature that caused the real failure. Both checks matter: one establishes the basic task, while the other isolates the suspected format issue.

Download the result and reopen it through the intended receiving application. A successful export is only half of an exchange. The destination may apply its own date or numeric interpretation. If an identifier must remain text, configure that explicitly instead of assuming that preserved characters will always be displayed unchanged.

Repair the producer when possible

If the export repeatedly emits unmatched quotes or inconsistent columns, investigate its generation settings or report a minimal example to its maintainer. Repeated manual editing creates a fragile process and makes it difficult to distinguish a structural correction from an accidental content change.

Keep the untouched export, the reduced reproduction and a description of the fix. Once a corrected import preserves the fields, reconcile the record count and a few known values. A good CSV repair restores a trustworthy exchange of information; it does not merely produce a table-shaped preview by deleting the difficult characters.