What exporting to CSV means
What it means to export or save data as CSV: what the file contains, what gets lost, how it behaves when shared, and when another format is the better choice.
Exporting to CSV means writing data from an application, such as a spreadsheet, database, contact list or reporting tool, into a plain-text file. In that file each line holds one record and commas separate the fields. CSV stands for comma-separated values. "Export as CSV" and "save as CSV" usually describe the same result: the data in this format. An export typically produces a separate copy. Whether a "save as" command also switches the open document to CSV depends on the application.
Is CSV the right format for your purpose?
CSV is a good choice when the goal is to move raw values between systems. Typical cases are importing into another program, loading into a database, processing with a script, or keeping a simple archive of the data. Its main benefit is portability: it is plain text, so a very wide range of spreadsheet programs, databases and programming languages can read it. The main tradeoff is that only values survive. Formatting, formulas, multiple sheets, charts and information about data types do not. Keep the native file if the layout, calculations or styling are what matter. If a person only needs to read the information, a formatted table or a short plain-text summary is often easier to use than raw CSV.
What the export actually changes
The export converts a structured view of data into a sequence of characters that follows a few conventions:
- Each row becomes one line of text.
- Each column boundary becomes a delimiter, normally a comma.
- A field that contains the delimiter, a double quote or a line break is wrapped in double quotes.
- A double quote inside a quoted field is written twice.
- The first line often, but not always, holds column names.
Name,City,Note
"Smith, Jane",Boston,"Said ""hello"" at check-in"
Lee,Austin,
In this example, the name "Smith, Jane" is quoted because it contains a comma. The note contains quotation marks, so each one is doubled inside the quoted field. The last line ends in a comma, which means its Note field is empty. When this file is read back, it should yield three columns and two data rows.
The key distinction is between stored characters and presentation. A CSV file holds only characters. Anything that existed purely as presentation has nowhere to go, including bold text, colors, column widths, merged cells and number styles such as currency symbols applied by formatting. Applications differ on whether a cell exports its underlying value or its displayed value, for example a full-precision number versus a rounded one, or a date in one format versus another. Opening the exported file in a plain text editor shows exactly what was written.
| Element | Typical result in a CSV export |
| Cell values (text and numbers) | Kept as characters |
| Formulas | Usually replaced by their calculated results |
| Fonts, colors, borders, column widths | Dropped |
| Merged cells | Dropped; the value usually lands in one cell |
| Multiple sheets or tabs | Not supported in a single file; usually only one sheet is exported |
| Charts, images, comments | Dropped |
| Data types (date, number, text) | Not recorded; the reading program has to infer them |
"CSV" is also used loosely. In regions where the comma is the decimal separator, some programs use a semicolon as the delimiter and still call the file CSV. Tab-separated files (TSV) follow the same idea with tabs. A commonly cited description of the format is RFC 4180, but it is informational rather than a strictly enforced standard. Tools vary in delimiter, quoting and line-ending choices, so two files that are both called CSV may not be interchangeable without adjusting import settings.
Will the file stay readable and usable after you share it?
Character encoding is the most common source of trouble. Accented letters, non-Latin scripts and emoji depend on the encoding the file was written in, often UTF-8. If the receiving program assumes a different encoding, those characters can appear garbled even though the file itself is intact. Some programs detect UTF-8 more reliably when the file starts with a byte-order mark. Whether a particular program needs one should be checked in its documentation.
Reopening a CSV in a spreadsheet can change how values are interpreted. Spreadsheet programs often guess data types when they open a CSV. They may strip leading zeros from ZIP codes or ID numbers, show long digit strings in scientific notation, or turn text that looks like a date into a date. The stored text is unaffected, but saving the file again from the spreadsheet can make those changes permanent. Using the program's import option and marking sensitive columns as text avoids this.
Copying and pasting behaves differently from opening a file. Depending on the program and its paste options, CSV text pasted into a spreadsheet may split into columns or land entirely in one column. Pasted into an email or chat message, it appears as raw lines with commas, which is hard to read once there are more than a few columns.
Accessibility depends on how the file is opened. In a text editor, a CSV is a stream of values and delimiters with no table structure, and the header row is just another line. In a spreadsheet, the same data can be navigated as cells, but this overview did not test how any particular screen reader handles it. If the audience will read the data rather than process it, provide an accessible table or a plain-text summary alongside the CSV.
There is also a safety point. Spreadsheet programs may treat a field that begins with characters such as an equals sign as a formula when the file is opened. This matters when exported data includes text entered by other people. Some export tools offer a setting to neutralize such values. If the file will be opened in a spreadsheet, check whether yours does.
For search and editing, plain text is an advantage: CSV files can be searched, compared and version-tracked with ordinary text tools. Editing by hand is risky, though. A missing quote or an extra comma shifts every following field in that row.
Quick checks before relying on an export
- Open the file in a plain text editor and confirm the delimiter and quoting look as expected.
- Compare the number of data rows with the source.
- Look at a few records containing commas, quotation marks, line breaks or non-English characters.
- Check columns with leading zeros, long numbers or dates after opening the file in the destination program.
- If the source had several sheets, confirm which one was exported.
- Keep the original file if formatting or formulas may be needed later.
What this overview does not cover
This article describes general, widely documented behavior of the CSV format. It does not test any specific application, import destination or assistive technology. Details such as default encoding, delimiter choice, whether displayed or underlying values are exported, and protection against formula-like fields vary by program and version. Confirm them in the documentation of the tool you are using, or with a small test file, before depending on them.