Any way to have Excel 2010 treat a quoted value "08540" as text not number when opening a CSV
Solution 1:
There is no way to do it automatically. You need to convert the file to the following format first:
="08540",1,"PRINCETON","NJ"
If your files do have the format as you said (i.e. all you need is to add =
in the beginning of every line) then the conversion is easy. Create a CONVERT.BAT
file on your Desktop with the following code:
@echo off
mkdir "%USERPROFILE%\Desktop\Converted CSV files"
:next
if '%1'=='' goto done
set CSV="%USERPROFILE%\Desktop\Converted CSV files\%~nx1"
for /F "tokens=*" %%A in ('TYPE %1') do echo =%%A >>%CSV%
shift
goto next
:done
Now you can drag-n-drop your .CSV
files on the CONVERT
icon. The processed files will appear in the Converted CSV files
folder.