Forum Discussion
Peter Snabe
Aug 03, 2018Copper Contributor
Save as CSV file (UTF-8) with double quotes - how?
Hi I often need to save data as a CSV file (UTF-8) where all cells are surrounded by double quotes. I cannot find any way to do that in Excel - can it be true? Any idea how to do that?
Ernie707
Mar 24, 2023Copper Contributor
I use Powershell for this. Excel 2016 still has this issue so I work around. I do have code to read from an xls a worksheet and convert it from excel, then do this again. Pretty much a pain but it works pretty fast. 150,000 records import-csv/export-csv only take a couple minutes.
$dir = 'C:\SomeFile\And\Folder\Path\'
$filein = '20230304T0051PST-RealEstate-Values.csv'
$fileout = '20230304T0051PST-RealEstate-Values-PS.csv'
cd $dir ; import-csv -LiteralPath $filein | export-csv -LiteralPath $fileout -NoTypeInformation -Encoding UTF8