Friday, November 2, 2012

Saving an Excel Created CSV in UTF-8 Format

I recently had the need to create a large CSV file to import our corporate employee list into a new system.  The system required that the CSV be formatted in UTF-8 format.

I already had a table from another application with a complete list of user information, so performing a copy/paste to Excel 2010 made things super easy.  Unfortunately, even if you start with a UTF-8 formatted CSV file, once you modify and save it using Excel, you lose the UTF-8 formatting.

I did a little searching trying to find a way to save the CSV in UTF-8 format with Excel and came up empty.  Then I stumbled across an easy solution.

Once you have your file ready for import, save the file as CSV using Excel.

 

Next, open the CSV using Notepad, click File --> Save As, set "Save as type" to "All Files", then select UTF-8 in the Encoding drop-down menu next to the Save button.



That's it, save the document and you now have a UTF-8 encoded CSV which you created in Excel.