What Is a CSV File?
See how a CSV file stores rows and fields, how quoted commas work, and how to import it without losing leading zeros or misreading columns.

The file is text; the table is how you read it
A CSV file contains records in plain text. A separator, usually a comma, divides the fields. The first record may list column names, but some exports begin with data. A spreadsheet displays the file in a grid and may interpret text as numbers or dates. That interpretation happens when you open or import the file, not because the CSV itself defines a number format.
If an account code must remain 0042, inspect the original text and import that column as text. A correctly aligned spreadsheet can still contain the wrong value.
Read a two-record example
shipment_id,destination,units
0042,"Depot A, Bay 2",2
0043,"Depot B ""North""",3
The first line names three columns. The first destination contains a comma, but it belongs to one field because the field is quoted. The second destination contains quotation marks around North. Two adjacent double quotes inside a quoted field represent a single double-quote character in the output. After parsing, you should see two records, three fields per record and five total units.
Counting commas in a line is not a reliable way to find the number of columns. Use the parser or the import preview to confirm that Depot A, Bay 2 is one cell.
Choose the reader by what you need to check
| What you need to do | Choose | What to check |
|---|---|---|
| See the original separator, leading zeros or quote marks | Text editor | Raw header and a representative record |
| Review a file with colleagues in a grid | Spreadsheet import | Delimiter, encoding and each important column type |
| Process repeated exports automatically | A CSV reader in your workflow | Header, field count, row count and rejected records |
| Preserve nested objects or lists | Use the original structured format when possible | Decide whether to keep or intentionally flatten parent-child data |
Ignore the extension when the preview disagrees with the file. If all fields are in one column, look at the first line before you change any data. A supplier might have used semicolons under a different locale. Match the separator to the actual export and confirm the result on more than one row.
Import a copy without changing identifiers
Start from the original file, not a spreadsheet that someone already opened and saved. In Excel, use Data → From Text/CSV and inspect the preview. Set the correct delimiter; open the transformation step and make identifier columns text before loading, removing or correcting any earlier type conversion that changed those identifiers. If the data includes a date such as 03/04/2026, confirm the sender's date order before converting it. If you do not know the intended date order, keep the source value as text.
Once loaded, compare two IDs against the raw file, including one with leading zeros. Confirm the number of imported records and whether a header was counted as data. Save a separate workbook for team review; keep the original text file for reconciliation.
Find the source of a bad result
If there are extra columns, inspect a field containing a comma and see whether the export quoted it. If rows appear to split, check whether the source contains a quoted field with a line break. Do not remove all quotes or line breaks: doing so can change real values. If a required field is blank, keep that fact visible and ask the sender whether they intended an empty value or omitted a field.
For recurring work, keep a small sample with an ordinary row, a quoted comma and a leading-zero ID. Rerun those checks on each revised export before accepting an entire delivery.
CSV questions
Can CSV hold several sheets? Not in a single standard CSV file. Export each table to a separate file or use a workbook format if you need several sheets and formatting together.
Can I fix a missing leading zero by changing the spreadsheet display? Display formatting does not prove the original ID. Return to the raw export and import it as text. If the raw export has already lost the value, ask the data owner for the original.
Preview the CSV to check how the fields line up.
Use the output you can verify
If your source is still nested JSON, define which object becomes one row before producing a CSV. After converting, repeat the same checks for identifiers, field counts and totals. For a CSV you already received, start with the raw file and keep the original beside the reviewed copy.
For a JSON-to-CSV handoff, agree on which array supplies the records before choosing the columns.

