CSV Import Error Repair
Find and fix what is breaking your CSV import.
- CSV
- TSV
- TXT
Double-clicking a CSV can turn long IDs into 1.23E+15, drop leading zeros and misread dates. Here's how to open one safely in Excel and Google Sheets.
A CSV file is plain text, but a spreadsheet app doesn’t open it as text: it decides what each column holds.
That can turn a 16-digit order number into 1.23E+15, a postal code like 00123 into 123, and a day-first
date into the wrong day. The safe way is to import the file instead of double-clicking it, and to tell the app
which columns are text before anything is converted. Here’s how in Excel and Google Sheets, and what to do if
the damage was already saved.
RFC 4180, which documents the common CSV format, describes records made of fields separated by commas, with optional double quotes around a field. [Source 1] Nothing in that format marks a column as text, a number or a date, so the app reading the file has to decide. [Source 1] When Excel opens a .csv file, it uses the current default data format settings to interpret each column. [Source 2]
Excel automatically removes leading zeros and converts large numbers to scientific notation, like 1.23E+15, so that formulas and math operations can work on them. [Source 3] Microsoft’s examples of data this hits include phone numbers, credit card numbers, product codes, account numbers and postal codes. [Source 3]
Excel has a maximum precision of 15 significant digits, so in a number with 16 or more digits, every digit past
the 15th becomes zero. [Source 3, Source 4] Microsoft’s example is
12345678901234567890, which becomes the number 12345678901234500000 and may be displayed as 1.23457E+19.
[Source 5] The zeros are in the value itself, not just in how it’s displayed.
By default, a value such as 00123 is converted to the number 123. [Source 5] In a postal
code or a product code the zeros are part of the value, so an import that matches records on that field may no
longer find them.
Some locales use a default date format of mm/dd/yyyy, while others use dd/mm/yyyy. [Source 8] So
03/04/2026 is 4 March in one and 3 April in the other, and the file doesn’t say which it means. Codes can turn
into dates too: by default, a value like JAN1 is converted to the date January 1.
[Source 5]
Text is stored as numeric values, and an encoding standard says which value stands for which character. [Source 10] Read a file with a different encoding and the same values show different characters: in Microsoft’s example, a Cyrillic Й appears as É on a computer that uses the Western European (Windows) encoding. [Source 10] A byte-order mark (BOM) at the start of the file helps: Excel opens a UTF-8 CSV normally if it was saved with one. [Source 9]
Keep the original download untouched and open a copy in a plain text editor, such as Notepad on Windows or TextEdit on a Mac. A text editor doesn’t turn values into numbers or dates, so you see what the file contains. Check the separator (commas, semicolons or tabs), how IDs and codes are written, whether any date has a day above 12 (which tells you the order), and how a few accented names look.
If the IDs already read 1.23E+15 here, the damage happened before the file reached you: see
if the file was already saved.
Step 3 matters because, for CSV files, Power Query detects data types by inspecting the values (by default in the first 200 rows) and adds a Changed Type step that converts them. [Source 7]
Dates in a different order: by default, Power Query uses your operating system’s locale to interpret text, numbers, dates and times. [Source 8] If the file uses another order, right-click the date column’s header, select Change Type > Using Locale, and choose the data type and locale. [Source 8] To change it for the whole file, select the Edit Settings icon next to the Source step under Applied Steps, and pick a locale in the Comma-Separated Values dialog. [Source 8]
Accents look wrong: for a UTF-8 file without a BOM, Microsoft points to Data > Get Data > From file > Get Data from Text/CSV. [Source 9]
The Text Import Wizard is a legacy feature that is still supported. [Source 6] To turn it on, select File > Options > Data, then under Show legacy data import wizards, select From Text (Legacy). [Source 6] Then go to Data > Get & Transform Data > Get Data > Legacy Wizards > From Text (Legacy). [Source 6] Renaming the file from .csv to .txt before you open it also makes Excel run the wizard. [Source 2]
Excel for Microsoft 365 and Excel 2024, on Windows and Mac, let you switch the conversions off. [Source 5] On Windows, go to File > Options, select Data and go to Automatic Data Conversion; on a Mac, select Excel > Preferences, then the Edit tab. [Source 5] You can stop Excel removing leading zeros, keeping only 15 digits of long numbers, turning digits around the letter “E” into scientific notation, and turning letter-and-number combinations into dates. [Source 5] These options apply when you open a .csv file, but they don’t directly affect data imported with Power Query. [Source 5]
Google’s help page for importing doesn’t describe a way to set a column’s type during the import. [Source 11] Compare a few IDs, codes and dates with the raw file afterwards. The spreadsheet’s locale sets its default currency, date and number formatting; you can change it under File > Settings. [Source 12] If your file is day-first, check the locale before you import.
If someone opened the export in a spreadsheet and saved it again, the file now holds whatever the app turned the values into, and formatting can’t bring the originals back:
1.23E+15 keeps only the digits you can see.03/04/2026, can’t be told apart from the file alone.One partial repair: if every value should have the same number of digits, like five-digit postal codes, the TEXT
function can pad the zeros back, for example =TEXT(A1,"00000"). [Source 3] If the codes vary
in length, you can’t know how many zeros each one lost.
The reliable fix is to export the data again from the system it came from, keep that download as it is, and open a copy with one of the import methods above.
CSV Import Repair checks a CSV, TSV or TXT file in your browser: the file is read on your device and isn’t uploaded. It doesn’t open Excel workbooks. For each kind of damage:
Nothing changes without your approval, every change is listed in the change report you download, and Undo reverses it.
Whichever app you use, the order is the same: keep the original, look at it as text, and tell the app what each column is before it decides for you.
The facts in this article were checked against these sources on October 25, 2026.
Find and fix what is breaking your CSV import.
Spreadsheets
Excel saves CSV files with semicolons when your region writes decimals with a comma. Here's why, how to open them correctly and how to get commas back.