How to convert Excel to CSV and export Excel files to CSV UTF-8 format

Comma-separated values (CSV) is a widely used file format that stores tabular data (numbers and text) as plain text. Its popularity and viability are due to the fact that a great deal of programs and applications support csv files, at least as an alternative import / export format. Moreover, the csv format allows users to glance at the file and immediately diagnose the problems with data, if any, change the CSV delimiter, quoting rules, etc. All this is possible because a CSV file is plain text and an average user or even a novice can easily understand it without any learning curve.

In this article, we will try to investigate quick and efficient ways to export data from Excel to CSV and learn how to convert Excel to CSV keeping all special characters and foreign symbols intact. The below methods work for all versions of Excel 2016, 2013, 2010 and 2007.

How to convert Excel file to CSV

If you need to export an Excel file to some other application, e.g. to the Outlook Address book or Access database, you can convert your Excel worksheet to CSV first and then import a .csv file in another program. Below you will find the step-by-step instructions to export an Excel workbook to the CSV format by using Excel's Save As command.

  1. In your Excel workbook, switch to the File tab, and then click Save As. Alternatively, you can press F12 to open the same Save As dialog.
    To convert an Excel file to CSV, switch to the File tab and click Save As.
  2. In the Save as type box, choose to save your Excel file as CSV (Comma delimited).
    Save your Excel worksheet as a CSV (Comma delimited) file.

    Besides CSV (comma delimited), a few other csv formats are available to you:

    • CSV (comma delimited). This format saves an Excel file as a comma-separated text that can be used in another Windows program or another version of Windows operating system.
    • CSV (Macintosh). This format saves your Excel workbook as a comma-separated file for use on Mac operating system.
    • CSV (MS-DOS). Saves your Excel file as a comma-separated file for use on the MS-DOS operating system.
    • Unicode Text (*txt). This is a computing industry standard supported by almost all current operating systems including Windows, Macintosh, Linux and Solaris Unix. It can handle characters of almost all modern languages and even some ancient ones. So, if you Excel file contains data in a foreign language, save it in the Unicode Text format first and then convert to CSV, as explained in Exporting Excel to CSV UTF-8 or UTF-16.
    Note. All of the above mentioned formats save only the active Excel sheet.
  3. Choose the destination folder where you want to save your Excel file in the CSV format, and then click Save.

    After you click Save, Excel will display two dialogs. Don't worry, these are not error messages and everything is going right.

  4. The first dialog reminds you that only the active Excel spreadsheet will be saved to the CSV file format. If this is what you are looking for, click OK.
    Only the active Excel spreadsheet will be saved to the CSV format.

    If you need to save the contents of all the sheets your workbook contains, click Cancel and then save each spreadsheet individually as a separate Excel file (workbook). After that save each Excel file as CSV.

  5. Clicking OK in the first dialog will display a second message informing you that your worksheet may contain features unsupported by the CSV encoding. This is Okay, so simply click Yes.
    A worksheet may contain features unsupported by the CSV encoding.

This is how you convert Excel to CSV. The process is quick and straightforward, and you are unlikely to run into any hurdles along the way.

Export Excel to CSV with UTF-8 or UTF-16 encoding

If your Excel spreadsheets contain some special symbols, foreign characters (tildes, accent etc.) or hieroglyphs, then converting Excel to CSV in the way described above won't work.

The point is the Save As CSV command distorts any characters other than ASCII (American Standard Code for Information Interchange). And if your Excel file has smart quotes or long dashes (e.g. inherited from the original Word document that was copied /pasted to Excel), these characters would be mangled too.

An easy alternative is saving an Excel workbook as a Unicode(.txt) file and then converting it to CSV. In this way you will keep all non-ASCII characters undamaged.

Before we proceed further, let me briefly point out the main differences between UTF-8 and UTF-16 encodings so that you can choose the right format in each particular case.

UTF-8 is a more compact encoding since it uses 1 to 4 bytes for each symbol. Generally, this format is recommended if ASCII characters are most prevalent in your file because most such characters are stored in one byte each. Another advantage is that a UTF-8 file containing only ASCII characters has absolutely the same encoding as an ASCII file.

UTF-16 uses 2 to 4 bytes to store each symbol. However, a UTF-16 file does not always require more storage than UTF-8. For example, Japanese characters take 3 to 4 bytes in UTF-8 and 2 to 4 bytes in UTF-16. So, you may want to use UTF-16 if your Excel data contains any Asian characters, including Japanese, Chinese or Korean. A noticeable disadvantage of this format is that it's not fully compatible with ASCII files and requires some Unicode-aware programs to display them. Please keep this in mind if you are going to import the resulting file somewhere outside of Excel.

How to convert Excel to CSV UTF-8

Suppose you have an Excel worksheet with some foreign characters, Japanese names in our case:
An Excel worksheet with foreign characters needs to be converted to CSV UTF-8.

To export this Excel file to CSV keeping all the hieroglyphs intact, follow the steps below:

  1. In your Excel worksheet, go to File > Save As.
  2. Name the file and choose Unicode Text (*.txt) from the drop-down list next to "Save as type", and then click Save.

    Save your Excel workbook as Unicode Text (*.txt) file.

  3. Open the unicode .txt file using your preferred text editor, for example Notepad.
    Note. Some simple text editors do not fully support all Unicode characters, therefore certain characters may display as boxes. In most cases this won't affect the resulting file in any way and you can simply ignore this or use a more advanced text editor such as Notepad++.
  4. Since our unicode text file is a tab-delimited file and we want to convert Excel to CSV (comma-separated) file, we need to replace all tabs with commas.
    Note. If you do not need exactly the comma-separated file, just any CSV file that Excel can understand, you can skip this step because Microsoft Excel handles tab-separated files fine.

    If you do want a comma-delimited CSV file, proceed with Notepad in the following way:

    • Select a tab character, right click it and choose Copy from the context menu, or simply press CTRL+C as shown in the screenshot below.
      Copy the tab character in a .txt file.
    • Press CTRL+H to open the Replace dialog and paste the copied tab (CTRL+V) in the Find what field. When you do this, the cursor will move rightwards indicating that the tab was pasted. Type a comma in the Replace with field and click Replace All.
      Replace all tabs with commas.

    In Notepad, the resulting file should look similar to this:

    A comma-separated text file in Notepad

  5. Click File > Save As, enter a file name and change the encoding to UTF-8. Then click the Save button.
    Change the encoding to UTF-8 and click the Save button.
  6. Open the Windows Explorer and change the file extension from .txt to .csv.

    An alternative way is to change the .txt extension to .csv directly in Notepad's Save as dialog and choose All files (*.*) next to Save as type, as shown in the screenshot below.
    Change the .txt file extension to .csv directly in Notepad's Save as dialog.

  7. Open the CSV file from Excel by clicking File > Open > Text files (.prn, .txt, .csv) and verify if the data is Okay.
    Note. If your file is intended for use outside of Excel and the UTF-8 format is a must, do not make any edits in the worksheet, nor should you save a CSV file in Excel, because this may cause encoding problems. If some of the data does not appear right in Excel, open the file in Notepad and fix the data there. Remember to save the file in the UTF-8 format again.

How to convert an Excel file to CSV UTF-16

Exporting an Excel file as CSV UTF-16 is much quicker and easier than converting to UTF-8. This is because Excel automatically employs the UTF-16 format when saving a file as Unicode (.txt).

So, what you do is simply click File > Save As in Excel, select the Unicode Text (*.txt) file format, and then change the file extension to .csv in Windows Explorer. Done!

If you need a comma-separated or semicolon-separated CSV file, replace all tabs with commas or semicolons, respectively, in a Notepad or any other text editor of your choosing (see Step 6 above for full details).

Other ways to convert Excel files to CSV

The methods of exporting Excel to CSV (UTF-8 and UTf-16) we have just described are universal, meaning they work for all special characters and in any Excel version, from 2003 to Excel 2016.

There exist a handful of other ways to convert Excel data to CVS. Unlike the previous solutions, they won't produce a pure UTF-8 CSV file (except for OpenOffice that allows exporting Excel files to several UTF encodings), but in most cases they will contain the correct characters which you can painlessly convert to the UTF-8 format later using any text editor.

Convert Excel to CSV using Google spreadsheets

The use of Google Spreadsheet to export an Excel file to CSV seems to be a very simple workaround. Assuming that you already have Google Drive installed, perform the following 5 easy steps.

  1. On the Google Drive, click the Create button and choose Spreadsheet.
  2. Click Import from the File menu.

    Choose Import from the File menu.

  3. Click Upload and choose a file from your computer.
  4. Choose Replace spreadsheet and then click Import.

    Choose Replace spreadsheet and then click Import.

    Tip. If you have a relatively small Excel file, then you can simply copy / paste the data to a Google sheet to save time.
  5. Go to the File menu > Download as, select Comma separated values (CSV, current sheet) and save the SCV file to your computer.
    Download a Google spreadsheets as a comma-separated (CSV) file.

Finally, open the CSV file in some text editor to make sure all of the characters are saved correctly. Regrettably, the CSV files converted in this way do not always correctly display in Excel. Kudos to Google and shame to Microsoft : )

Save .xlsx to .xls and then convert to .csv file

This method of converting Excel to CSV hardly needs any further explanations because the heading says it all.

I have come across this solution on one of Excel forums, cannot remember now which exactly. To be honest, this method has never worked for me, but many users reported that special characters, which got lost when saving .xlsx directly to .csv, were preserved if to save a .xlsx file to .xls first, and then save .xls as .csv in Excel, as explained in How to convert Excel to CSV.

Anyway, you can try this method of exporting Excel to CSV on your side and if it works, this can be a real time-saver.

Save Excel as CSV using OpenOffice

OpenOffice, an open-source suite of applications, includes a spreadsheet application named Calc that is really good at exporting Excel data to CSV format. In fact, it provides more options to convert spreadsheets to CSV files (encodings, delimiters etc.) than Excel and Google Sheets combined.

You simply open your Excel file with OpenOffic Calc, click File > Save as… and save the file as Text CSV (.scv) type.

In the next step, you will have a choice of various Character sets (encodings) and Field delimiters. Naturally, you select Unicode (UTF-8) and comma if your goal is a CVS UTF-8 file (or whatever encoding and separator character you need) and click OK. Typically, the Text delimiter will remain the default quotation mark (").
Convert an Excel file to SCV using OpenOffice.

You can also use another application of the same kind, LibreOffice, to perform fast and painless Excel to CSV conversions. It would be really nice if Microsoft Excel provided similar options with regard to CSV encodings, agree?

These are the ways of converting Excel to CSV I am aware of. If you know other more efficient methods to export an Excel file to CSV, please do share in comments. Thank you for reading!

You may also be interested in