CSV vs Excel
Format differences and what to watch when exchanging or checking data.
What each format is
CSV (Comma-Separated Values) is plain text. Every row is a line; columns are separated by a delimiter — usually a comma, but sometimes a tab, semicolon, or pipe. The first row is typically a header. There is no formatting, no formulas, no multiple sheets — just raw data values in a simple, universal structure that any programming language, database, or application can read.
Excel (.xlsx) is a binary container format developed by Microsoft. It stores cells with their values, formatting (colours, borders, fonts), formulas, charts, images, and multiple worksheets in a single file. It is designed for interactive editing and presentation in a spreadsheet application, not for data exchange.
Feature comparison
- Multiple sheets
- Excel: yes, unlimited sheets. CSV: no — one CSV file = one table of data. To store multiple sheets as CSV you need multiple files.
- Formulas
- Excel: cells can contain formulas (=SUM(A1:A10)) that recalculate automatically. CSV: only the current calculated value is saved — no formulas survive a Save As to CSV.
- Formatting
- Excel: cell colours, bold, borders, number formats, conditional formatting. CSV: none — all formatting is lost when saving as CSV.
- Character encoding
- Excel: .xlsx stores text as UTF-16 internally, handles encoding automatically. CSV: encoding is not specified by the file itself — it must be agreed upon between writer and reader, which is the source of most garbled text problems.
- File size
- CSV: compact. The same data in CSV is typically 5–10× smaller than .xlsx. Faster to transfer, easier to process in scripts.
- Interoperability
- CSV: any OS, any language, any database — no application dependency. Excel: requires Microsoft Office or compatible software (Google Sheets, LibreOffice) to open natively.
- Data type preservation
- CSV: everything is text — the reader interprets values as numbers, dates, etc. Excel: cell types are stored, though this can cause problems when saving as CSV (see below).
When to use CSV
- System integration — database imports, API batch uploads, ETL pipelines all commonly use CSV because it requires no parser dependency
- Archiving raw data — CSV is a durable format; .xlsx files can become unreadable if the creating application is unavailable
- Scripting and automation — CSV is trivial to read and write in any language without a library
- Sharing data across platforms — CSV opens on Windows, Mac, Linux, mobile, and in any text editor without compatibility issues
When to use Excel
- Interactive analysis — pivot tables, charts, conditional formatting, and filters are Excel-native features
- Formulas and calculations — when the data itself contains calculated fields that must stay live
- Multi-sheet workbooks — when related tables belong together in one file with cross-sheet references
- Presenting data to non-technical users — formatting, colours, and charts make data easier to read in Excel
Common problems when converting Excel to CSV
Wrong encoding on save
”Save As → CSV (Comma delimited)” produces a file in your system’s regional encoding (Windows-1252 on Western Windows, Shift-JIS on Japanese Windows), not UTF-8. This garbles non-ASCII characters when opened on other systems. Always use ”Save As → CSV UTF-8 (Comma delimited)” to get a UTF-8 BOM file. See Encoding issues.
Leading zeros stripped
Excel treats numeric-looking values as numbers. Product codes, postal codes, and ID numbers that start with 0 (e.g. 00123) are stored and exported as 123. To prevent this, format the column as Text in Excel before entering data, or fix the values after export using single-file check.
Date format changes
Excel stores dates as serial numbers internally and formats them for display according to your regional settings. When saved as CSV, the date appears in whatever format Excel is currently displaying — which may be 12/31/2024, 31/12/2024, or 2024-12-31 depending on locale. This inconsistency can break date parsing in downstream systems.
Formulas exported as values
A cell containing =A1&”-”&B1 exports as the current calculated result, not the formula. The formula is permanently lost. If downstream processing depends on the original formula logic, document it separately before converting.
Multi-sheet data loss
CSV can only hold one sheet. When you save a multi-sheet workbook as CSV, Excel only saves the active sheet and silently discards the rest. Ensure you export each required sheet individually.
Common problems when opening CSV in Excel
Garbled characters
Excel assumes the regional encoding when opening CSV without a BOM. A UTF-8 file without BOM will show garbled characters for any non-ASCII content. Fix: convert to UTF-8 BOM using Encoding fix, then open in Excel.
Columns not separated correctly
If your CSV uses a semicolon or tab delimiter but Excel expects commas (or vice versa), all data appears in a single column. Fix: use Format & basic check to confirm the delimiter, then open with Excel’s Text Import Wizard specifying the correct delimiter.
Numbers treated as text
Values like ”001” (quoted in the CSV) may open as text in Excel, preventing arithmetic. Values like 1.5 with a period decimal separator may not parse correctly in locales that use a comma as the decimal separator.
Open the tools
- Format & basic check — confirm encoding and delimiter after saving from Excel
- Encoding recovery — convert to UTF-8 BOM for correct display in Excel
- Single-file check — detect leading zeros, spaces, duplicate keys
- Encoding issues guide — detailed explanation of CSV encoding problems