by Svetlana Cheusheva, updated on
The tutorial shows how to change CSV separator when importing or exporting data to/from Excel, so you can save your file in the comma-separated values or semicolon-separated values format.
Excel is diligent. Excel is smart. It thoroughly examines the system settings of the machine it's running on and does its best to anticipate the user's needs … quite often to disappointing results.
Imagine this: you want to export your Excel data to another application, so you go save it in the CSV format supported by many programs. Whatever CSV option you use, the result is a semicolon-delimited file instead of comma-separated you really wanted. The setting is default, and you have no idea how to change it. Don't give up! No matter how deep the setting is hidden, we'll show you a way to locate it and tweak for your needs.
To handle .csv files, Microsoft Excel uses the List separator defined in Windows Regional settings.
In North America and some other countries, the default list separator is a comma, so you get CSV comma delimited.
In European countries, a comma is reserved for the decimal symbol, and the list separator is generally set to semicolon. That is why the result is CSV semicolon delimited.
To get a CSV file with another field delimiter, apply one of the approaches described below.
When your save a workbook as a .csv file, Excel separates values with your default List separator. To force it to use a different delimiter, proceed with the following steps:
Depending on which separator you wish to use, configure the settings in one of the following ways.
To convert Excel file to CSV semicolon delimited, set the default decimal separator to a comma. This will get Excel to use a semicolon for the List separator (CSV delimiter):
To save Excel file as CSV comma delimited, set the decimal separator to a period (dot). This will make Excel use a comma for the List separator (CSV delimiter):
If you want to change a CSV separator only for a specific file, then tick the Use system settings check box again after exporting your Excel workbook to CSV.
Note. Obviously, the changes you've made in Excel Options are limited to Excel. Other applications will keep using the default List separator defined in your Windows Regional settings.
There are a few different ways to import CSV file into Excel. The way of changing the delimiter depends on the importing method you opted for.
For Excel to be able to read a CSV file with a field separator used in a given CSV file, you can specify the separator directly in that file. For this, open your file in any text editor, say Notepad, and type the below string before any other data:
In a similar fashion, you can use any other character for the delimiter - just type the character after the equality sign.
Once the delimiter is defined, you can open your text file in Excel like you normally would, from Excel itself or from Windows Explorer.
For example, to correctly open a semicolon delimited CSV in Excel, we explicitly indicate that the field separator is a semicolon:
Another way to handle a csv file with a delimiter different from the default one is to import the file rather than open. In Excel 2013 an earlier, that was quite easy to do with the Text Import Wizard residing on the Data tab, in the Get External Data group. Beginning with Excel 2016, the wizard is removed from the ribbon as a legacy feature. However, you can still make use of it:
In step 2 of the wizard, you are suggested to choose from the predefined delimiters (tab, comma, semicolon, or space) or specify your custom one:
Microsoft Excel 2016 and higher provides one more easy way to import a csv file - by connecting to it with the help of Power Query. When creating a Power Query connection, you can choose the delimiter in the Preview dialog window:
To change the default List separator not only for Excel but for all programs installed on your computer, here's what you need to do:
For this change to work, the List separator should not be the same as Decimal symbol.
When done, restart Excel, so it can pick up your changes.
Notes:
Before changing the List separator on your machine, I encourage you to carefully read this section, so you fully understand possible outcomes.
First off, it should be noted that depending on the country Windows uses different default separators. It's because large numbers and decimals are written in different ways across the globe.
In the USA, UK and some other English-speaking countries including Australia and New Zealand, the following separators are used:
Decimal symbol: dot (.)
Digit grouping symbol: comma (,)
List separator: comma (,)
In most European countries, the default list separator is a semicolon (;) because a comma is utilized as the decimal point:
Decimal symbol: comma (,)
Digit grouping symbol: dot (.)
List separator: semicolon (;)
For example, here's how two thousand dollars and fifty cents is written in different countries:
US and UK: $2,000.50
EU: $2.000,50
How does all this relate to the CSV delimiter? The point is that the List separator (CSV delimiter) and Decimal symbol should be two different characters. That means setting the List separator to comma will require changing the default Decimal symbol (if it's set to comma). As the result, numbers will be displayed in a different way in all your applications.
Moreover, List separator is used for separating arguments in Excel formulas. Once you change it, say from comma to semicolon, the separators in all your formulas will also change to semicolons.
If you are not ready for such large-scale modifications, then change a separator only for a specific CSV file as described in the first part of this tutorial.
That's how you can open or save CSV files with different delimiters in Excel. Thank you for reading and see you next week!
Table of contents