How do you force excel to quote all columns of a CSV file?

This page also has the solution which comes straight from the horse's mouth:

http://support.microsoft.com/kb/291296/en-us

If the link degrades, the topic to search for is:

"Procedure to export a text file with both comma and quote delimiters in Excel" and/or "Q291296"

tl;dr: use their macro


If you open the XLS file in LibreOffice or OpenOffice, then Save As....and choose Text CSV, it alows generating a CSV file that also includes quotes as delimiters. E.g.: "Smith","Pete","Canada" "Jones","Mary","England"

Just check the "Quote all text cells" box: Export to CSV with LibreOffice

In order to also quote numeric fields, highlight your cell range and change the cell formatting to "text" prior to saving.


I found this easy solution:

  1. High­light the cells you want to add the quotes.
  2. Right click and go to: For­mat Cells → Tab: Number → Category: Custom
  3. Paste the fol­low­ing into the Type field: "''"@"''" (see details below)
  4. Click “okay”

The string you are pasting is "''"@"''" which is double quote, single quote, single quote, double quote, @ symbol, double quote, single quote, single quote, double quote.

Edited for Excel 2010 from the information found here.


Powershell appears to dump correctly. so something like

search for powershell.exe on windows machine if you dont know powershell.

import-csv C:\Temp\Myfile.csv | export-csv C:\Temp\Myfile_New.csv -NoTypeInformation -Encoding UTF8

Hope it helps someone.