Excel – Removing commas from CSV file

csvexportmicrosoft excel

I created an Excel .XLSX file, reformatted the columns from currency to numbers with 2 decimals and no thousands separator, then exported to a .CSV file, then to a .TXT file.

Once I did that, the number columns in just one column ended up with commas (1000 separator). How do I stop this from happening? With the programming I have to upload a file I can have no commas within my numbers.

Best Answer

If the CSV file uses tab characters, or some other delimiter between fields other than a comma, this is easy:

Download the free, open source GNUWin version of sed and put it in C:\Windows\SYSTEM32

Them enter this command

sed "s/,//" OLDFILE.CSV > NEWFILE.TXT

If your CSV uses commas to separate the fields, well, use Excel to output a new version which uses tabs instead of commas to separate the fields before regenerating a new version of OLDFILE.CSV.

Related Question