Data Import & Export

Fix Excel CSV File Importing into One Column in RStudio

Camila MilosovichCamila Milosovich Oct 28, 2026 870 views

Question details

The user needs to import a CSV file created in Excel into RStudio, but the data is incorrectly merged into a single column instead of separating into distinct columns.

How to Fix Excel CSV Importing into One Column in RStudio
Product
Excel, RStudio
Device & OS
not provided
Scenario
Importing a spreadsheet dataset into a statistical programming environment for data analysis.
Observed behavior
The CSV file displays correctly with multiple columns in Excel, but it loads as one combined column when imported into RStudio.
Before you start

Open your CSV file in a plain text editor like Notepad or TextEdit before importing it into RStudio. This allows you to visually confirm whether commas or semicolons are being used to separate your data.

Solution 1Recommended

Adjust the Delimiter Setting in RStudio

The most common reason for this issue is a mismatch between the delimiter used in the CSV file and the one RStudio expects.

When Excel saves a CSV file, it relies on your computer's regional settings. If your region uses a comma as a decimal separator, Excel will use a semicolon as the column delimiter. By default, RStudio expects a comma, which causes it to read semicolon-separated data as a single column.

1
Initiate data import

Open RStudio and navigate to the Environment pane. Click on 'Import Dataset' and select 'From Text (base)' or 'From Text (readr)'.

2
Select the CSV file

Browse your computer and select the CSV file that was created in Excel.

3
Change the delimiter

In the Import Options dialog box, locate the 'Delimiter' or 'Separator' dropdown menu. Change it from 'Comma' to 'Semicolon' (or vice versa, depending on what your file uses).

4
Verify and import

Check the Data Preview window to ensure the columns are now separated correctly, then click 'Import'.

Adjust the Delimiter Setting in RStudio
Alternative Method via Code: If you are importing the data using R code instead of the user interface, you can use the function read.csv2('filename.csv') or read.csv('filename.csv', sep=';') to explicitly tell RStudio to use a semicolon delimiter.
Effortless Data Export with WPS Office

Prepare Your Data for RStudio with WPS Spreadsheet

WPS Spreadsheet provides a streamlined way to view, format, and export your datasets as CSV or XLSX files, ensuring seamless compatibility when importing data into RStudio or other analytical tools.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your data file.
  2. 2. Format the data: Ensure your columns are clean, properly labeled, and formatted without merged cells.
  3. 3. Export the file: Go to 'Menu' > 'Save As', and select either 'CSV (Comma delimited)' or 'Microsoft Excel Workbook (*.xlsx)'.
  4. 4. Import into RStudio: Use RStudio's import tool to seamlessly load your formatted dataset.
Fully compatible with Microsoft Excel formats (.xlsx, .csv, .xls).Clear, customizable options for saving and encoding data files.Lightweight and fast, perfect for handling large datasets.Free to use with a familiar, easy-to-navigate interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel save my CSV with semicolons instead of commas?

This happens due to your computer's regional settings. If your region uses a comma for decimal points (common in many European countries), Excel automatically uses a semicolon as the list separator to avoid confusing decimals with column breaks in CSV files.

Can I change the default CSV delimiter in Excel?

Yes, you can change this by modifying your system's regional settings. In Windows, go to the Control Panel, select 'Region', click 'Additional settings', and change the 'List separator' character to a comma.

Is it better to use CSV or XLSX for RStudio imports?

CSV files are plain text and generally load faster, making them ideal for very large datasets. However, XLSX files retain original formatting and bypass delimiter confusion completely, which can be more convenient for smaller or more complex datasets.

How do I fix delimiter issues on a Mac?

On a Mac, you can check your system's region settings by going to System Settings > General > Language & Region. Alternatively, you can open the CSV file in the 'TextEdit' application, use 'Find and Replace' to change semicolons to commas, and then import it into RStudio.