You export a CSV. Clean data. Perfect rows. You open it in Excel to check one thing.
You save it. You close it.
Your data is destroyed.
March 1st became `44257`. Phone number `0123456789` became `123456789`. Gene name `SEPT9` became `Sep-9`. Your colleague's carefully formatted product ID `001-2024` is now a date: `Jan-2024`.
Excel didn't ask. Excel didn't warn you. Excel just... decided your data meant something else.
This cost a genetics lab [actual published research papers](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-1044-7). In 2016, researchers found that one-fifth of genetics papers contained gene names mangled by Excel. `SEPT9` (Septin 9, a real gene) auto-converts to the date `Sep-9`. `MARCH1` (Membrane Associated Ring-CH-Type Finger 1) becomes `Mar-1`.
The scientific community had to rename genes because Excel wouldn't stop.
What Excel Does (That You Didn't Ask For)
When you open a CSV, Excel scans every cell and guesses the "correct" type:
| You wrote | Excel reads it as | What you see |
|-----------|------------------|--------------|
| `03/01/2024` | Date | `Mar 1, 2024` or `44257` (serial number) |
| `1/3` | Date | `Jan 3` (current year) |
| `001234` | Number | `1234` (leading zero gone) |
| `1E5` | Scientific notation | `100000` |
| `SEPT9` | Possible date | `9-Sep` |
| `0.5` | Number | `0.5` (correct, but stored as float, precision issues later) |
None of this happens if you open the same CSV in Google Sheets, LibreOffice, or a text editor. It's not a CSV problem. It's an Excel problem.
The Worst Part: Silent Data Corruption
Excel doesn't show you a dialog: *"I'm about to change 47 cells. Continue?"*
It just does it. And when you hit Save, the CSV is rewritten with the mangled data. Your original file is gone.
I once spent two hours debugging a payment system. We imported transaction IDs from a partner. Every ID looked fine in our database... except 12 transactions that failed validation.
Turns out: the partner's finance person opened the CSV in Excel "just to check one row," then saved it. Transaction IDs like `1E9` (literally the string `1E9`, their internal code format) got converted to `1000000000`. When we tried to look up those IDs in the partner's system: not found.
The partner insisted they sent correct data. They did. Excel ate it between export and email.
How to Actually Protect Your CSV Data
### Method 1: Never Open CSV in Excel (Serious)
Use a real text editor:
- VS Code
- Sublime Text
- Notepad++
- Even Notepad (Windows) or TextEdit (Mac) in plain text mode
Need a table view? Use [this CSV viewer tool](/tools/csv-viewer) — it shows you the raw data, no auto-conversion.
### Method 2: Import, Don't Open
If you absolutely must use Excel:
1. Open Excel first (blank workbook)
2. Go to Data → Get Data → From Text/CSV (or Data → From Text in older versions)
3. Select your CSV file
4. In the import wizard:
- Set Column data format to Text for every column that shouldn't be auto-converted
- Or set specific columns to Date/Number only when you know they are
This puts *you* in control. Excel won't guess.
### Method 3: Pre-Escape Your Data (If You're Generating the CSV)
If you're exporting CSVs from code and you know users will open them in Excel, prefix dangerous values with a single quote (`'`):
```csv
name,id,date
Alice,'001234,'03/01/2024
Bob,'1E5,'1/3
```
Excel interprets `'001234` as text and shows `001234` (the leading quote is hidden, but the cell is text type).
Downside: If the user copies the cell, the quote comes with it. Not perfect, but better than silent corruption.
### Method 4: Save as XLSX Instead
If your workflow allows, skip CSV entirely:
- XLSX preserves types (you explicitly set "this is text")
- Google Sheets (upload CSV there, share link instead of sending CSV file)
- SQLite database (if you control both ends of the pipeline)
CSV is supposed to be simple. Excel made it a minefield.
Why Does Excel Even Do This?
Historical reasons. In the 1980s, people used spreadsheets to store everything: budgets, schedules, inventory. Auto-converting `1/3` to a date saved time.
But in 2026, we use CSVs for:
- API data exports
- Database dumps
- Machine-generated logs
- Genomics datasets
- Financial transaction records
None of these need Excel to guess. But Excel's defaults haven't changed.
Microsoft knows. They added the Text Import Wizard. They added Power Query. But the default behavior—double-click a CSV, auto-convert everything—remains unchanged, because changing it would "break compatibility" with 40-year-old workflows.
Real-World Damage Control
If your CSV already got mangled:
1. Check your Recycle Bin / Trash — maybe the original is there
2. Check cloud sync history — Dropbox/OneDrive/Google Drive keep versions
3. Re-export from source — if the CSV came from a database/API, generate it again
4. Check email attachments — if someone sent it to you, the original might still be in your inbox
If you caught it before saving:
- Close Excel without saving
- Open the CSV in a text editor to verify it's still intact
The Tools That Won't Betray You
Need to work with CSV and avoid Excel's traps?
- [CSV to JSON Converter](/tools/csv-to-json) — parse CSV safely, download as JSON
- [CSV Formatter](/tools/csv-formatter) — clean and preview CSV without type conversion
- [Text Replacer](/tools/text-replacer) — fix mangled data in bulk (regex: `^\\d+$` → add leading quote)
All client-side. Your data never leaves your browser.
One More Thing: Google Sheets Isn't Innocent Either
Google Sheets is *better* than Excel (it asks before auto-converting in most cases), but it still does this:
- `1/3` → date
- `1E5` → number
- Leading zeros stripped on paste (unless you format the column as "Plain Text" first)
The only 100% safe way to handle CSV: treat it as text until you explicitly choose otherwise.
---
Your CSV data is literal. `001234` means the string `001234`, not the number `1234`. `SEPT9` means the gene Septin 9, not September 9th.
Excel disagrees. Don't let Excel win.