Guide
How to open a CSV file in Excel without breaking numbers and dates
The ways Microsoft lists for opening a CSV, why Excel changes some columns, and how to stop it.
Short answer
To open a CSV in Excel without losing data, use Data > From Text/CSV instead of opening the file directly. Microsoft says Excel interprets each column with its default data format settings when it opens a .csv file, so dates can be misread and leading zeros dropped. The import's Edit step can set a column's data type to Text.
Why a CSV changes when it opens
- Microsoft: "When Excel opens a .csv file, it uses the current default data format settings to interpret how to import each column of data." Its example is a column that is month-day-year in the file while Excel's default is year-month-day.
- Excel "automatically removes leading zeros, and converts large numbers to scientific notation, like 1.23E+15", Microsoft says, "in order to allow formulas and math operations to work on them."
- Excel has "a maximum precision of 15 significant digits", so for a number with 16 or more digits "any numbers past the 15th digit are rounded down to zero."
Three ways to open it
| Method | What Microsoft says |
|---|---|
| Open the file | Choose File > Open and pick the file. "If the file is a .csv file, Excel automatically opens the text file and displays the data in a new workbook." Columns are read with the default data format settings. |
| Data > From Text/CSV | On the Data tab, in the Get & Transform Data group, click From Text/CSV. A preview shows the data; the page says you can "choose a character to use from the list under Delimiter", and then load the data or transform it first. |
| Text Import Wizard | Microsoft says you can change the file name extension from .csv to .txt before you open it, which brings up the wizard, where the delimiter can be changed in Step 2. |
Keeping leading zeros and long numbers
- On the Data tab, click From Text/CSV and select the file.
- In the preview, choose Edit (Transform Data) to open the editor.
- Select the column, then choose Home > Transform > Data Type > Text, and Replace Current if asked.
- Load the result. Microsoft notes that refreshing reapplies the steps.
Microsoft lists other routes in its page on keeping leading zeros: a custom number format for codes of fewer than 16 digits (which "will not restore leading zeros that were removed prior to formatting"), the TEXT function, formatting the range as Text before typing or pasting, and an apostrophe before a number. For codes of 16 digits or larger it says you must use a text format.
When the columns do not split
Microsoft says that when a workbook is saved as .csv the default list separator is a comma, and it describes changing the separator for all programs in the Windows Region settings, with the caution that this is "a global change on your computer, affecting all applications." If a file arrives in a single column, its delimiter may not be a comma; in the Get & Transform preview the delimiter can be picked from a list.
If the damage is already done
Numbers that arrive as text can be converted afterwards: see numbers stored as text. Zeros that Excel has already removed are not restored by formatting alone, so re-import the file with the column set to Text.
Common questions
- Why did my dates swap day and month?
- Microsoft says Excel reads each column with its default data format settings, and gives the example of a month-day-year column read under a year-month-day default. Setting the column's type in the import step avoids the guess.
- Why does a long account number end in zeros?
- Excel keeps 15 significant digits, and Microsoft says digits past the 15th are rounded down to zero. Import the column as text.
- Is there a limit on rows?
- Microsoft says you can import or export up to 1,048,576 rows and 16,384 columns.
- Do Statementizer exports need this?
- The Excel export is a workbook, so it opens without a CSV import step. The CSV export is plain text and follows the steps on this page.
What Statementizer does with this
Statementizer reads supported broker statement PDFs into rows you can review, and exports them to Excel or CSV. The Excel export is a workbook, which opens without the CSV import step.
See what Statementizer convertsRelated guides and formats
Sources
Every quote is from Microsoft's "Import or export text (.txt or .csv) files" and "Keeping leading zeros and large numbers" pages, read on 2026-11-12. Neither page shows an updated date. Menu names can differ between Excel versions.
Verified on 2026-11-12 by the Statementizer Team.