Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to convert CSV to Excel without losing leading zeros

Open a CSV and save it as an Excel workbook, or import it with control over delimiters, dates, and columns that must stay as text.

Table of Contents

For a quick conversion, open the CSV in Excel and save a copy as Excel Workbook (*.xlsx). If it contains ZIP codes, account IDs, long numbers, or dates in an unfamiliar format, import it through the Data tab so you can set the column types before Excel converts them.

Open a CSV and save it as an Excel workbook

In Excel, choose File > Open > Browse.

3 Ways to Convert CSV to Excel Successfully Picture 1

If the CSV is missing from the file picker, change the filter to Text Files or All Files.

3 Ways to Convert CSV to Excel Successfully Picture 2

Open the CSV and check that the rows and columns look right. Then choose File > Save As, select Excel Workbook (*.xlsx), and save it under a new name.

3 Ways to Convert CSV to Excel Successfully Picture 3

From Windows File Explorer, you can also right-click the file and choose Open with > Excel. Use Choose another app if Excel is absent.

3 Ways to Convert CSV to Excel Successfully Picture 5

3 Ways to Convert CSV to Excel Successfully Picture 6

Import a CSV with control over column types

In current desktop Excel, choose Data > From Text/CSV and select the file. In the preview, check the separator and file origin. For example, select UTF-8 if the file uses that encoding and accented characters appear incorrectly.

Choose Transform Data and set columns containing IDs or leading zeros to Text. If Power Query already added a Changed Type step that removed leading zeros, remove that step and set the correct type from the original text. Choose Close & Load, then save as .xlsx.

Use the legacy Text Import Wizard in older Excel

The older wizard also lets you choose where to load the data. Open the destination workbook and select the cell where the imported table should start.

3 Ways to Convert CSV to Excel Successfully Picture 7

Choose Data > From Text and select the CSV. A delimited .txt file may also open in the wizard.

3 Ways to Convert CSV to Excel Successfully Picture 8

3 Ways to Convert CSV to Excel Successfully Picture 9

3 Ways to Convert CSV to Excel Successfully Picture 4

Choose Delimited and check the starting row.

3 Ways to Convert CSV to Excel Successfully Picture 10

Choose the separator used in the file, such as comma or semicolon. Check that quoted text stays together and the preview shows one field per column.

3 Ways to Convert CSV to Excel Successfully Picture 11

3 Ways to Convert CSV to Excel Successfully Picture 12

On the final screen, select each identifier column and choose Text. Then click Finish.

3 Ways to Convert CSV to Excel Successfully Picture 13

Confirm the destination and click OK. Compare sample IDs and dates with the original CSV before saving the workbook.

3 Ways to Convert CSV to Excel Successfully Picture 14

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.