Comma-separated values
What is a CSV file?
A CSV (comma-separated values) file is a table saved as plain text: one row per line, with commas between the cells. Because it's so simple, nearly every spreadsheet, database, CRM and accounting tool can import and export it. That simplicity is also its weakness: there's no formatting, no formulas and only one sheet.
How to open a CSV file
- Windows
- Open it in Excel, or in Notepad to see the raw text; importing through Excel's Data tab protects leading zeros.
- Mac
- Double-click to open in Numbers, or open it in Excel via File, Import.
- iPhone
- Preview it in the Files app as a simple table, or open it in Numbers or Excel.
- Android
- Open it with Google Sheets from Google Drive, or the Excel app.
Good for
- Imports into almost every system
- Tiny, simple files
- Readable even in a text editor
Watch out for
- No formatting, formulas or multiple sheets
- Spreadsheets can mangle ZIP codes and long IDs when opening it
- Commas inside values need careful quoting
CSV file questions
Why did Excel remove the zeros from my ZIP codes?
Excel guesses that 02134 is a number and drops the zero. Converting the CSV to XLSX with values kept as text avoids this.
My accented names look garbled. Why?
The file's encoding doesn't match what the app expected. UTF-8 is the safest choice for names in any language.
Should I use CSV or XLSX?
Use CSV for importing into other systems. Use XLSX when people need to read, format or calculate with the data.