A CSV File is Not Opening Correctly in Excel – 4 Cases with Solutions

 

 

Case 1 – A CSV File Is Opening in One Column

When the delimiter is not properly set, Excel may open CSV files in one column.

  • Open the CSV file in the Notepad: data is delimited by commas.

CSV file in Notepad

  • If you open it in Excel, data will be displayed in column A

CSV File is Not Opening Correctly in Excel

 

Solution 1 – Change the Regional Settings

Steps:

  • Open the Control Panel.
  • Click Clock and Region. Make sure, view by category is selected. Otherwise, you will need to select Region.
  • In the new window, select Change data, time or number formats in Region.

go to Control Panel. and select Clock and Region.

  • In the Region window, select “Additional settings…”.

Changing Regional Settings

  • In the Customize Format window, enter comma (,) in List separator.
  • Click OK.

type comma (,) in the List separator in Customize Format window

  • If you open the CSV file, it will be displayed in multiple columns.

Read More: How to View CSV File in Excel


Solution 2 – Specify the Delimiter by Editing the CSV File

If Excel can recognize the data separators, it will show them in multiple columns.

Use “sep=delimiter” and add a tab instead of the delimiter, as the tab was also used in the file.

Steps:

  • Data is delimited by a semicolon.

Excel CSV File Not Opening Correctly as Delimiter is not specified

  • Open the file in a text editor. Here, Notepad.
  • Enter the following lines at the top.

sep = ;

Specify Delimiter in the CSV File

  • If you open the file in Excel, data will be displayed in multiple columns.

Specify Delimiter by Editing the CSV File and import CVS file in Excel Correctly


Solution 3 – Specify the Delimiter

Import the data from the CSV file into Excel.

Steps:

  • Go the Data tab and select From Text/CSV.

select From Text/CSV in Data tab

  • In the Import Data window, go to the file location.
  • Select the CSV file and click Import.

  • In the new window, in Load, select “Load”.

Specify semicolon as Delimiter

  • The CSV data will be imported into Excel. Delete row 5 (used in Solution 2).

Fixed the problem that Excel CSV File Not Opening Correctly

Read More: How to Open CSV with Delimiter in Excel


Case 2 – Leading Zeros Aren’t Kept after Importing a CSV File

In a CSV file, leading zeros are frequently omitted by default.

Apply the Power Query to keep the leading zeros.

Steps:

  • Go to the Data tab.
  • Select From Text/CSV in Get & Transform Data
  • Locate your CSV file and select it.
  • Click  Import.

You will see a preview:

  • Click Transform Data.

Excel CSV File Not Opening Correctly as Leading Zeros as missing

  • In the Power Query Editor window, select the Account Number column.
  • Select Text.

change column format to Text in power query editor

  • In the dialog box, choose Replace Current.

You will see that zeros in the Account Number column are displayed.

  • Follow the same steps for the Telephone Number column:

  • Click Close & Load.

click on Close & Load in power query

This is the output.

Fixed the problem that Excel CSV File Not Opening Correctly by keeping leading zeros

Read More: Open CSV File in Excel Without Formatting


Case 3 – Dates Are Incorrectly Formatted after Importing a CSV File

Steps:

  • Go to the Data tab and select From Text/CSV to open Import Data.
  • Select the CSV file and click Import. Select All Files in the file type field.
  • In the window containing the dataset, select Transform Data.

Dates Are Formatted Incorrectly While Importing from CSV File

  • In the Power Query Editor, select the Date of Birth column.
  • Go to the Transform tab and select Data Type.
  • Select Text.

change date format to text format to fix Excel CSV File Not Opening Correctly

  • In the Change Column Type dialog box, select Replace current.

  • Go to the Home tab and select Close & Load.

  • This is the output.

Read More: How to Open Large CSV Files in Excel


Case 4 – Numbers are Converted to Scientific Notation

After importing a CSV file, numbers are converted to scientific notation. To avoid this:

Numbers Converted to Scientific Notation while opening CSV file in Excel

Steps:

  • Go to the Data tab, select From Text/CSV and import the CSV file.
  • In the window containing the dataset, select Transform Data.

  • In the Power Query Editor, select Account Number.
  • Choose Text.

  • Numbers will be displayed in full form.
  • Go to the Home tab and select Close & Load.

  • This is the output.

Fixed the problem that Numbers Converted to Scientific Notation while CSV file opening in Excel

Read More: How to Open CSV File in Excel with Columns Automatically


Related Articles


<< Go Back to Open CSV in Excel | Import CSV to Excel | Importing Data in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Osman Goni Ridwan
Osman Goni Ridwan

OSMAN GONI RIDWAN is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, OSMAN has transitioned into the role of a content developer. Specializing in creating technical content exclusively centered around Excel... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo