dominicwong
asked on
How to preserve commas in CSV file when saving the file in Excel 2010
Hi experts
I've problem in preserving the commas in a CSV file when I try to save the file by Excel 2010.
The csv files are attached. Thanks in advance.
Before saving:
Settings,,,,,,,,,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,
,Description,,,,,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,
1, 2, 3, 4,5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,,,,,,,,,,,,,,,,,,,,
After saving by Excel 2010:
Settings,,,,,,,,,,,,,,,,,, ,,,,,,,,,, ,,,,
,Description,,,,,,,,,,,,,, ,,,,,,,,,, ,,,,,,,
1,2,3,4,5,6,7,8,9,10,11,12 ,13,14,15, 16,17,18,1 9,20,21,22 ,23,24,25, 26,27,28,2 9,30,31,32 ,33
original.csv
saved2010.csv
I've problem in preserving the commas in a CSV file when I try to save the file by Excel 2010.
The csv files are attached. Thanks in advance.
Before saving:
Settings,,,,,,,,,,,,,,,,,,
,Description,,,,,,,,,,,,,,
1, 2, 3, 4,5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,,,,,,,,,,,,,,,,,,,,
After saving by Excel 2010:
Settings,,,,,,,,,,,,,,,,,,
,Description,,,,,,,,,,,,,,
1,2,3,4,5,6,7,8,9,10,11,12
original.csv
saved2010.csv
It looks to me like it is saving on the area where there is content. If you want it to save all of those blank columns, you need some content in the last column to the right.
ASKER
Thanks Dave.
The empty columns are for future expansion so they are blank for the moment.
Or, is there any characters that I can insert and they don't get displayed in Excel 2010?
The empty columns are for future expansion so they are blank for the moment.
Or, is there any characters that I can insert and they don't get displayed in Excel 2010?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Dave and Dushan.
A better option is to rewrite my code and avoid the dependency on the empty columns.
A better option is to rewrite my code and avoid the dependency on the empty columns.
I agree. Thanks for the points.