New Tool Radar

AI for Data & Spreadsheets

How to Fix a CSV That Opens in Excel as One Column

Fix a CSV that opens in Excel as one column by choosing the right delimiter on import.

Schematic with three steps: Open the file in a text editor; Import with Data, From Text/CSV and pick; Load the data and check the column.

A CSV file that uses semicolons instead of commas, common where the comma is the decimal separator, opens in Excel as a single column of text with semicolons inside it. The data is all there, but no formula can read it. Re-import the file and tell Excel which character separates the fields, instead of trying to split the column by hand.

What you need

  • The CSV file, with its delimiter known or visible in a text editor
  • Excel with a blank workbook
  • A note of how many columns the file should produce

Step 1: Open the file in a text editor and read the delimiter

Open the CSV in Notepad or a similar editor and look at the first line: commas, semicolons, tabs or pipes between the fields tell you the delimiter. Count the fields on that line; that is the column count to expect.

Step 2: Import with Data, From Text/CSV and pick the delimiter

In Excel, use Data, Get & Transform Data, From Text/CSV, choose the file, and pick the delimiter you found from the Delimiter list. Check the preview: the data must split into the expected number of columns.

Step 3: Load the data and check the column count

Click Load, then count the columns in the imported sheet and compare with the count from the text editor. If the counts differ, re-import with a different delimiter rather than fixing the columns by hand.

Worked example: synthetic CSV with semicolon separators

The table below is a synthetic example. It shows the expected result of fixing a CSV delimiter; no file was imported.

Check Value Result
Fields on the first line 5 Semicolons separate them
Columns after double-click open 1 All data in one column
Delimiter chosen on import Semicolon From the Delimiter list
Columns after import 5 Matches the source
Rows imported 40 All rows present

Expected result (UNTESTED). double-clicking the file gives 1 column, but importing with the semicolon delimiter gives 5 columns and all 40 rows. The file is fixed by the import, not by hand-splitting. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A file that mixes delimiters, such as commas inside quoted text, needs the text qualifier set as well as the delimiter.
  • Changing the Windows list separator changes the delimiter for every program, not just Excel; prefer the import dialog.
  • A CSV saved from a system that uses a comma as the decimal separator almost always uses semicolons.
  • Opening a CSV by double-clicking never asks for a delimiter; always import through Data, From Text/CSV.

Sources

See all