Data formatting can get mixed up when you open a data file with CSV format. In this article, we are going to show you how to avoid formatting change in CSV files in Excel.

Download Workbook

If you need to prevent numbers from changing into dates when entering data, please see How to stop excel from changing numbers to dates.

Excel applies formatting updates when opening CSV files, and you won't get a prompt to prevent this. You need to import the data in the CSV file. By importing the data, you will gain the ability to select the data type before parsing it. You do not need to select anything if you have a Microsoft 365 subscription or Excel 2019. The newer versions detect the data automatically.

Microsoft 365 or Excel 2019

Avoiding formatting change on CSV on Microsoft 365 or Excel 2019 is fairly easy.

  1. Activate the Insert tab in the Ribbon
  2. Click From Text/CSV in the Get & Transform Data section
  3. Select your file
  4. You will see the preview of your data
    1. Either click Load to import the data
    2. Or, use Transform button to open Power Query Editor and modify your data before parsing

How to avoid formatting change on CSV files in Excel 01

You will see your data without any changes to formatting.

How to avoid formatting change on CSV files in Excel 02

Excel 2016 – Excel 2010

In previous Excel versions, you can use the Text Import Wizard with text strings. To avoid formatting change on CSV, you first need to set data format manually.

  1. Activate the Insert tab in the Ribbon
  2. Click From Text/CSV in the Get & Transform Data section
  3. Select your file
  4. Move to the Step 3 by Next. Make sure that comma as delimiter is selected
  5. In the 3rd step, select the columns where you'd like to keep the formatting
  6. Mark the Text option as a Column data format
  7. Click Finish to complete parsing

How to avoid formatting change on CSV files in Excel 03