Tutorials

How to Convert CSV to Excel Without Breaking Your Data

Double-clicking a CSV is the fastest way to corrupt it. Excel guesses at every column, and once you save, the guesses are permanent.

The SheetAI Team4 min readUpdated August 13, 2026
CSV to Excel, nothing broken: rows of cells passing through an import step, with some values changed. Cover image from the SheetAI blog.

Key takeaways

  • Don't double-click a CSV you care about. Import it, so you can set column types first.
  • Leading zeros, long IDs, codes that look like dates, and ambiguous dates are what get destroyed.
  • Characters like é mean the file is UTF-8 and was read as something else.
  • If a file is already damaged, re-import it. Repairing converted values is guesswork.

A CSV is just text. No types, no formatting, nothing telling Excel what any of it means. So when you open one, Excel has to guess at every column, and it guesses eagerly. Most of the time you don't notice. The times you do notice are expensive, and one of them lost 16,000 COVID test results.

What Excel changes without asking

In the CSVAfter double-clickingWhat that costs you
00745745Postcodes and account numbers lose leading zeros
88012345678901234568.80123456789012E+18IDs past 15 digits are rounded, permanently
MAR11-MarGene names, SKUs and part codes become dates
3/4/2026April 3 or March 4Locale decides, and the file doesn't say
+44 20 7946 0000#NAME? or a formulaA leading + is read as an operator
cafécaféUTF-8 read as Windows-1252
1.234,561.23456 or textEuropean decimals misparsed

The right way to import in Excel

1

Import it, don't open it

Start from a blank workbook and go to Data → Get Data → From Text/CSV. That opens the Power Query preview instead of applying Excel's guesses on the spot.

2

Set the encoding

File Origin to 65001: Unicode (UTF-8). If accented characters look wrong in the preview, this is the setting that fixes it, not a find-and-replace afterwards.

3

Confirm the delimiter

Comma, semicolon, tab or pipe. Files exported in European locales often use semicolons, because the comma is doing duty as the decimal separator.

4

Set the column types

Click Transform Data and set every ID, postcode, phone number and product code to Text. This one step prevents everything in the table above.

5

Set date columns by locale

Use Using Locale and pick the locale the file was exported from, not the one you're sitting in. It's the only way to resolve day and month reliably.

6

Load, then check

Compare the row count against the source, spot-check a value you know, and confirm =ISNUMBER() behaves on your numeric columns.

The right way in Google Sheets

Fewer options here, but one that matters. Use File → Import and set Convert text to numbers, dates, and formulas to No. Everything arrives as text, intact, and you convert the columns you actually want converted afterwards.

Set the spreadsheet locale under File → Settings to match the file's origin before you import, too. Locale drives date parsing and decimal separators, and changing it later doesn't re-parse what's already in the sheet.

Working out what went wrong

Before repairing anything, identify which failure you've got. They have different fixes, and one of them has no fix at all.

  • Numbers in a text column: =ISNUMBER(A2) is TRUE where you expected an ID string, and the leading zeros are gone.
  • Rounded IDs: scientific notation in the cell, or the last few digits are suspiciously all zeros. Not recoverable.
  • Codes turned into dates: the cell right-aligns and =ISNUMBER() is TRUE on something that should be text.
  • Encoding damage: é, ’, or  sitting at the start of the first header.
  • Everything in column A: wrong delimiter. Re-import with the right one.

Repairs, when you have no original

Restore leading zeros of known width
=TEXT(A2, "00000")
Only safe when every value really is the same width, like five-digit US ZIP codes.
Undo a date that should have been text
=TEXT(A2, "mmmyy")
Works if you know the original pattern. If the original was arbitrary text, the serial number underneath can't tell you what it was.
Patch a mangled string
=SUBSTITUTE(SUBSTITUTE(A2, "é", "é"), "’", "'")
A patch, not a fix. You're mapping known-bad sequences one at a time and you'll miss some.

Stopping it at the source

If you own the export, a few changes upstream remove this problem for everyone downstream, permanently.

  1. 1Export dates as ISO 8601 (2026-06-10). Unambiguous in every locale, and it sorts correctly even as text.
  2. 2Export UTF-8 with a BOM if the file will be opened in Excel on Windows. The BOM is what tells Excel the encoding.
  3. 3Quote every field containing a comma, a quote or a newline, and escape embedded quotes by doubling them.
  4. 4Offer .xlsx as an option where you can. It carries types, so none of this guessing happens.
  5. 5Never let a field start with + or =. Beyond the display mess, that's the CSV formula injection vector.

Two minutes of checking

However you got the data in, confirm it before building anything on top.

  • Row count matches the source system, remembering the header row.
  • =COUNTA() against =COUNT() on numeric columns. A gap means text-formatted numbers.
  • Column totals match a control total from the source, if you have one.
  • Sort each date column both ways and look at the extremes for 1900 or 2099 outliers.
  • Search the sheet for à as a one-shot encoding check.

Once it's in cleanly, the nine-step cleaning checklist picks up where this leaves off.

Convert a CSV without the guesswork

Upload the file and SheetAI flags the columns Excel would have mangled, IDs, codes and ambiguous dates, before anything gets converted.

Import a CSV in SheetAI

Frequently asked questions

Why does Excel remove leading zeros from my CSV?

›
Because a CSV carries no type information, so Excel infers one per column. A column of digits looks numeric, and numbers don't have leading zeros. Import via Data → From Text/CSV and set those columns to Text before loading instead of opening the file directly.

How do I stop Excel converting text to dates?

›
Set the column to Text in the Power Query import preview. There's no setting that disables date detection for a double-clicked CSV, because the conversion happens as the file opens. That's exactly why the import route matters for codes like MAR1.

Why do accented characters look wrong after importing a CSV?

›
The file is UTF-8 and was read as Windows-1252. Re-import with File Origin set to 65001: Unicode (UTF-8). If you control the export, writing the file with a UTF-8 byte order mark makes Excel detect it on its own.

Can I recover a long ID that Excel rounded?

›
No. Excel keeps 15 significant digits, so anything beyond that disappears the moment the conversion happens, and what's left is display rather than data. Re-import from the original CSV with the column typed as Text.

Is it better to save as .xlsx or keep working in CSV?

›
Save as .xlsx as soon as the data is in correctly. XLSX stores types, so your careful import survives being closed and reopened. Keep the CSV as the raw source, but stop editing it directly.

Written by The SheetAI Team

We build SheetAI, an AI spreadsheet assistant that reads your data, writes the formulas, and shows its work. We write about the spreadsheet problems we keep running into.

Get started

Put this to work on your own spreadsheet

Upload a file, ask in plain English, and watch SheetAI write the formulas into the sheet, with every step visible so you can check the work.

All articles

Works in your browser and Google Sheets · Setup in 30 seconds