Microsoft CSV files explained

What a Microsoft CSV file is, what Excel keeps and drops when saving to comma separated values, and when CSV is or isn't the right choice for sharing data.

"Microsoft CSV" usually means a comma separated values file created or opened by Microsoft Excel. It is not a separate Microsoft format. A CSV file is plain text: each line is a row, and a delimiter separates the fields in that row. Excel is one of the most common programs for producing and reading these files, and it has its own defaults and habits. Those habits explain most of the surprises people run into. This article explains what converting a spreadsheet to CSV changes, what survives copying and sharing, and when another format is the better choice.

Is saving to CSV suitable for your use?

CSV fits well when the goal is to move tabular data between programs. Examples include importing into a database, loading into a script, or sending records to a system that only accepts plain text. Its main benefit is portability. Almost any spreadsheet, database or programming language can read it, and anyone can open it in a text editor to see exactly what it contains.

The main tradeoff is that CSV stores only values. Formulas, formatting, multiple sheets, charts, comments and data types are not part of the format. If someone needs to keep working with the spreadsheet as a spreadsheet, keep the native workbook file and treat the CSV as an export, not a replacement.

Plain-text CSV is the right choice when the data will be processed by software, checked into version control, compared line by line, or archived in a form that does not depend on any one application. It is a poor choice when the reader needs layout, calculations or visual cues to understand the data.

What converting to CSV actually changes

Saving a workbook as CSV is a real change to the stored content, not just a change in how it looks. Excel writes out the displayed value of each cell from the active worksheet and discards everything else. Reopening the CSV later does not bring the discarded parts back.

Workbook element | Kept in CSV? | What happens
Cell values | Yes | Written as text, separated by the delimiter
Formulas | No | Only the calculated result is saved
Multiple worksheets | No | Only the active sheet is exported
Fonts, colors, borders, column widths | No | Lost entirely
Merged cells, charts, images, comments | No | Lost entirely
Number and date formatting | Partly | The displayed text may be saved, but the underlying type is not
Line breaks inside a cell | Yes, if quoted | The field is wrapped in double quotes

CSV also has its own quoting rules, broadly described in the informal specification RFC 4180 and followed by Excel in practice. A field that contains the delimiter, a double quote or a line break is wrapped in double quotes, and any double quote inside the field is doubled. The short example below shows a raw CSV file as it would appear in a text editor.

Name,Note,ZIP
"Smith, Jane","Said ""hello"" twice",02134
Lee,Plain text,10001

The text file stores the ZIP code as 02134, with its leading zero. Whether that zero survives depends on how the file is opened, which is covered in the next section.

The CSV variants in Excel's Save As menu

Excel offers several CSV options, and the names can be confusing. They differ mainly in character encoding and line endings, not in structure.

  • CSV UTF-8 (Comma delimited): saves text as UTF-8, which is the safest choice for names, accented letters and non-Latin scripts.
  • CSV (Comma delimited): uses a legacy system code page, so characters outside that code page can be replaced or lost.
  • CSV (Macintosh) and CSV (MS-DOS): older variants that use different line endings or code pages for compatibility with legacy systems.

Excel's choice of delimiter can also depend on the operating system's regional settings. In regions that use a comma as the decimal separator, Excel commonly uses a semicolon as the list separator. A file saved on one machine may then appear as a single column on another. TSV (tab separated values) avoids this particular clash because tabs rarely appear inside data, which is one reason some workflows prefer it.

Will the data stay usable after sharing or reopening?

The text inside a CSV file is stable. Problems usually come from how a program interprets that text when opening it. Opening a CSV directly in Excel by double-clicking lets Excel guess each column's type, and those guesses can change the data. Common cases include:

  • Leading zeros are dropped from values such as ZIP codes, phone numbers and product codes.
  • Long numeric identifiers, such as card or account numbers, may be shown in scientific notation and lose digits beyond Excel's numeric precision if the file is saved again.
  • Text that resembles a date, such as certain codes or abbreviations, may be converted to a date.
  • Dates may be read in a different day/month order depending on regional settings.
  • Non-English characters may display incorrectly if the file's encoding does not match what Excel expects.

Most of these changes only affect the open copy until it is saved. Saving the file again from Excel writes the altered values back to disk, and the original text is then lost. If a CSV must round-trip unchanged, keep a pristine copy, or edit it in a text editor or a tool that does not reinterpret values.

To control interpretation, import the file instead of opening it. Excel's Data tab offers a From Text/CSV import (and, in some versions, the older Text Import Wizard). This lets you choose the encoding and delimiter and set columns to Text so that identifiers are kept exactly as written. The menu names and options vary by Excel version and platform, so check the version you use.

Copying, search and accessibility

Because CSV is plain text, it can be copied, pasted, searched and compared like any other text file. Pasting CSV text into a spreadsheet may or may not split it into columns automatically. That depends on the destination program and its settings, so check the result rather than assuming it.

A CSV file carries no accessibility structure of its own. It has no marked header row, captions or descriptions, only rows of values. When a program displays it as a grid, any header handling comes from that program, not from the file. Read raw in a text editor, the content is a stream of values and delimiters, which can be hard to follow for long rows. No documentation or test results for specific screen readers were available for this article, so behavior in a particular assistive technology should be checked directly. If people need to read the data, as opposed to processing it, provide an accessible table in a document or workbook alongside the CSV.

Summary

A Microsoft CSV file is an ordinary comma separated values file shaped by Excel's defaults for encoding, delimiters and data-type guessing. Saving to CSV keeps the values from one sheet and discards everything else. Opening a CSV in Excel can quietly alter identifiers, dates and characters unless the file is imported with explicit settings. Use CSV UTF-8 for exchange, keep the original workbook for anything that depends on formulas or layout, and import rather than double-click when exact values matter.