CSV vs Excel: Key Differences and When to Use Each

How-to basics · Updated November 22, 2026

CSV is a plain-text format for storing tabular data, while Excel workbooks can store data alongside formatting, formulas, multiple sheets, charts, and other spreadsheet features. Choose CSV when you need a simple, widely compatible data exchange; choose an Excel workbook when you need to work with or preserve spreadsheet features.

What CSV means and how it works

CSV stands for comma-separated values. A CSV file represents a table as lines of text: each line usually corresponds to a row, and separators divide the fields in that row. For example, a small contact list might look like this:

Name,Email,City
Mina,mina@example.com,Leeds
Omar,omar@example.com,Bristol

Unlike a workbook, a CSV file does not define cells with visual formatting or spreadsheet behavior. It records the values as text, using conventions for separating fields, marking text, and representing line breaks. A field containing a comma is commonly wrapped in double quotes, and a double quote inside that field is commonly represented by two double quotes. Those conventions allow a CSV reader to distinguish punctuation inside a value from the separator between columns.

Despite its name, CSV does not have one universal set of rules. Some systems use semicolons or tabs rather than commas, and files can use different character encodings. This matters when a file moves between countries or applications: a semicolon-delimited file may be called CSV even though commas do not separate its columns. The receiving program needs to interpret the delimiter and encoding correctly.

What an Excel workbook contains

In Microsoft Excel for Microsoft 365 on Windows, the usual workbook format is XLSX. It can hold one or more worksheets, with cells that contain values, formulas, or both. A workbook can also preserve number formats, fonts, colors, column widths, tables, charts, conditional formatting, data validation, and other spreadsheet features. Some workbooks also contain connections or other features that depend on how they were created.

An Excel cell can display a value differently from the way it is stored. For example, a cell can hold the number 0.25 and display it as 25% through number formatting. A date may be stored as a numeric value and shown in a date format. Formulas can calculate results from other cells, and Excel can recalculate them when inputs change. CSV has no equivalent workbook structure: it can record a displayed value such as 25%, but it does not preserve the percentage format or a formula that produced it.

Excel can also work with formats other than XLSX. XLS is an older Excel workbook format, while XLSX is the standard modern format for workbooks without VBA macros. Macro-enabled workbooks use XLSM. A CSV is not an Excel workbook, even though Excel can open one and display its rows and columns.

CSV vs Excel: the practical differences

The important distinction is not that one format is always better. Each is designed to preserve different things. CSV favors a simple representation of table values; an Excel workbook favors a richer, editable spreadsheet.

  • Sheets: A CSV file represents one table, not a collection of named worksheets. An Excel workbook can contain multiple sheets.
  • Formulas: A workbook can store formulas and their calculated results. CSV stores text values only; it cannot preserve a working formula as a formula.
  • Formatting: Excel can preserve fonts, colors, dates, currency display, filters, and column widths. CSV does not carry these presentation details.
  • Charts and other features: Charts, pivot tables, data validation, and similar workbook features are not represented in CSV.
  • Compatibility: CSV is supported by many data tools and programming environments. XLSX is supported by Excel and many other spreadsheet applications, but advanced Excel features may not transfer perfectly between them.
  • File structure: CSV is readable as text in a basic text editor. XLSX is a structured workbook format and is not intended to be read as a simple text table.

There is no universal rule that CSV files are smaller or faster in every situation. A plain table saved as CSV is often compact, but size and processing speed depend on the data, compression, and application. XLSX files can be compact too. For a large dataset, the capabilities of the software opening it may matter more than the file extension.

Opening and saving CSV files in Excel

Excel can open a CSV file directly, but it may interpret the contents rather than treating every field as untouched text. That interpretation can change how values appear. A sequence such as 00127 may be read as the number 127, and a value that resembles a date may be displayed as a date. Long digit strings can also be converted to numbers; Excel preserves only 15 significant digits of numeric precision, so an identifier with more digits may not remain intact if Excel treats it as a number.

For greater control in Excel for Microsoft 365 on Windows, import the file instead of relying on a direct open. Use Data > From Text/CSV, review the preview, and check the delimiter and data types before loading the data. If a column contains product codes, postal codes, or long identifiers, set it to text during import so Excel does not convert it to a number or date. Available import options can vary with the file and Excel version.

When saving a workbook as CSV in Windows, use File > Save As > Browse, then choose a CSV option in the file type list, such as CSV UTF-8 (Comma delimited) (*.csv) when available. Excel normally saves only the active worksheet to CSV. It also warns that some workbook features are not compatible with the format. Check which sheet is active and review the exported file before sending it. Excel for Mac has its own Save As dialogs and may show different CSV choices; the same core limitation applies: CSV cannot retain workbook features or multiple sheets.

If a recipient reports that columns are all in one field, the likely issue is a delimiter mismatch. If special characters appear incorrectly, check the text encoding; UTF-8 is a common choice for sharing text across systems. For some regional settings, Excel may expect semicolons as separators. Importing through the text import controls lets you inspect and select a delimiter instead of guessing from the appearance of the file.

How to choose the right format

Start with what the recipient or next application needs to do with the file. If it needs a clean table of values for a database import, data analysis script, or broad exchange between systems, CSV is often a sensible choice. It avoids carrying workbook styling and many application-specific features, although you should still agree on delimiter, encoding, column order, and how dates or missing values are represented.

Use an Excel workbook when the spreadsheet itself is the deliverable: for example, when a colleague needs multiple tabs, formulas, filters, formatted reports, charts, or editable assumptions. XLSX is usually the right choice for routine Excel collaboration. If the workbook uses macros, it must be saved in a macro-enabled format such as XLSM to retain them; CSV cannot preserve or run macros.

  • Sending a data export to another system: Prefer CSV if that system requests it, and confirm its expected delimiter and encoding.
  • Sharing a report people will review or edit: Prefer XLSX if layout, formulas, or multiple sheets are important.
  • Archiving a final view of a table: CSV can preserve the exported text values, but keep a workbook copy if you may need the formulas, formatting, or source sheets later.
  • Sharing sensitive or formula-heavy work: Consider whether the recipient should receive only values. Exporting to CSV can remove workbook features, but it is not a substitute for reviewing the data for confidential content.

Common conversion problems and misconceptions

A frequent misconception is that saving a workbook as CSV merely changes its extension. It does not. The export changes the representation and discards features that CSV cannot store. If a workbook has five worksheets, the CSV export will not combine them into one file automatically; it exports the active sheet. To deliver several tables, export each sheet separately or choose a format designed to contain multiple sheets.

Another common problem is losing leading zeros. A CSV may contain the characters 00127, but when Excel opens it, Excel may interpret them as the number 127. The original text can still be present in the file even if Excel displays a converted value. Importing the column as text helps prevent that conversion. The same care is needed with dates, fractions, large identifiers, and values that begin with symbols Excel recognizes as instructions.

CSV also does not guarantee that a value will look identical in every application. A date written as 03/04/2026 can be interpreted differently depending on regional conventions. A robust exchange process documents the date format or uses an unambiguous representation agreed upon by the systems involved. Similarly, empty fields, quotation marks, line breaks inside a field, and decimal separators should be tested when a CSV is generated for another tool.

Finally, CSV files can contain text that a spreadsheet application treats as a formula when opened, particularly when a field begins with a formula marker such as an equals sign. This is a potential spreadsheet-injection concern for files built from untrusted input. Applications and import settings differ in how they handle such content, so organizations that distribute CSV exports should review untrusted fields and follow the receiving system’s security guidance rather than assuming that plain text is automatically harmless.

Compatibility, sharing, and safety

CSV’s simplicity makes it useful beyond spreadsheets: text editors, databases, statistical software, and scripts can often read it. That does not mean every CSV is interchangeable without preparation. A reliable handoff should specify the expected separator, character encoding, column names, and treatment of dates or blank values. If the file is intended for automated processing, avoid relying on visual conventions such as color or column width to convey meaning because those details are absent.

An XLSX workbook is more expressive, but its features can be interpreted differently by other spreadsheet programs. A basic worksheet usually transfers well, while advanced formulas, macros, external links, or specialized formatting may not. Before sharing a workbook with someone using another application, consider whether they need the formulas and interactive features or just a stable table of values. Exporting a separate CSV can help with data exchange, but retain the original workbook if it is the working source.

Neither format is inherently private or secure merely because of its file type. A CSV is easy to inspect as text, while a workbook can contain hidden sheets, comments, formulas, links, or metadata. Review the actual contents before sharing either format, especially if it contains personal, business, or confidential data. Use the access controls and approved sharing methods appropriate to the information.

Frequently Asked Questions

Is CSV the same as an Excel file?
No. CSV is a plain-text table format, while an Excel workbook such as XLSX can store multiple sheets, formulas, formatting, and other spreadsheet features. Excel can open CSV files, but that does not make CSV an Excel workbook.

Can a CSV file contain formulas?
CSV can contain characters that look like a formula, but it does not store a formula as a functioning spreadsheet calculation. If opened in a spreadsheet, some text may be interpreted as a formula, so use caution with files containing untrusted data.

Does saving Excel as CSV keep all worksheets?
No. Excel’s CSV export saves the active worksheet, not the whole multi-sheet workbook. Save a separate workbook copy if you need to keep the other sheets, formulas, or formatting.

Why do zeros disappear from a CSV in Excel?
Excel may interpret a value such as 00421 as the number 421 and omit the leading zeros from its display. Import the relevant column as text, or use an XLSX workbook when the values need to retain both their text identity and spreadsheet formatting.

Should I use CSV or XLSX for a data export?
Use the format requested by the receiving system. CSV is common for a single table of values; XLSX is better when the recipient needs multiple sheets, formulas, or presentation features. Confirm delimiter, encoding, and data types for a CSV export.

Alternatives when neither format fits

CSV and XLSX cover many everyday needs, but other formats can be more suitable in specific workflows. TSV uses tabs between fields and can be convenient when values frequently contain commas, though receiving applications still need to agree on the format. JSON is commonly used for structured data with nested objects, while XML is used in systems that exchange data using a defined tagged structure. These formats are not direct replacements for a formatted spreadsheet; their usefulness depends on what the next application expects.

For long-term data exchange, choose a format based on the data structure and the tools that must read it, then test a representative file before relying on it. For human editing and presentation, keep a workbook. For a straightforward rectangular table moving between systems, a carefully prepared CSV is often the simplest option.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.