CSV vs XLSX — when to use which
Published:
Excel’s Save As offers XLSX, CSV, XLS and more. They all seem to hold a table, but they are very different things.
Side by side
| CSV | XLSX | |
|---|---|---|
| What it is | A text file with comma-separated cells | An Excel workbook (a ZIP of XML files) |
| Sheets | One | Many |
| Formatting (colours, fonts, borders) | ❌ | ✅ |
| Formulas | ❌ (values only) | ✅ |
| Date and number formats | ❌ (stored as text) | ✅ |
| Encoding problems | Possible (garbled characters) | None |
| Opens in a text editor | ✅ | ❌ |
| Compatibility with software and databases | Almost universal | Spreadsheet apps |
| Size | Small | Moderate (compressed) |
When CSV is the right choice
- Importing into other systems: online shops, accounting software, databases and email tools almost all import CSV.
- Programming and analysis: Python, R and SQL tools read it directly.
- Version control: as plain text, changes are easy to compare in Git.
When XLSX is the right choice
- Documents people read and edit: formatting, formulas, multiple sheets and charts.
- Sharing: no encoding issues — it opens the same on every computer.
- Preserving data exactly: leading zeros and dates aren’t reinterpreted when someone opens the file.
The two classic CSV problems
- Garbled characters — a CSV doesn’t record its encoding, so Excel may misread UTF-8. → Fix garbled CSV text in Excel
- Disappearing leading zeros — Excel turns codes like
007into numbers. → Keep leading zeros
Both go away once the data is in XLSX. The CSV to XLSX converter detects the encoding and keeps leading zeros and long IDs exactly as written.
What happens when converting XLSX to CSV
With XLSX to CSV:
- each sheet becomes its own CSV (several sheets arrive as a ZIP),
- formulas are replaced by their last calculated values,
- dates are written as ISO dates such as
2026-01-15, read the same way everywhere, - files are UTF-8 with a BOM by default, so Excel shows non-English text correctly when you reopen them.
And XLS?
.xls is the Excel 97–2003 format. It’s limited to 65,536 rows and some newer tools no longer accept it. Converting with XLS to XLSX makes files smaller and more compatible.
Quick decision guide
| Situation | Format |
|---|---|
| Sharing a report with colleagues | XLSX |
| Uploading to a shop, database or app | CSV (check whether the system wants a BOM) |
| Developer data, version control | CSV or JSON |
| Long-term archive with formatting | XLSX |
| Long-term archive of raw data | CSV |
Summary
XLSX for documents people use, CSV for data systems consume. Converting CSVs to XLSX before opening them in Excel avoids garbled text and lost zeros.