.csv Commas ?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hello,

If I save a file in Excel 2007 as a .csv, does Excel now
place a comma after each, and every, Field automatically ?

Any conditions where it might not ?

I did a simple test where I just put an "x" in Row 1, Column 1
Saved as a .csv. (or, told it to)
Opened it up in Notepad.
Notepad shows the "x", but no comma after it.

Why ?

Thanks.
 
Bob explained :
Hello,

If I save a file in Excel 2007 as a .csv, does Excel now
place a comma after each, and every, Field automatically ?

Any conditions where it might not ?

I did a simple test where I just put an "x" in Row 1, Column 1
Saved as a .csv. (or, told it to)
Opened it up in Notepad.
Notepad shows the "x", but no comma after it.

Why ?

Thanks.

There is no comma because "x" is the only data. If you put "x" in A1:B1
then the file will have "x,x".

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
Bob said:
I did a simple test where I just put an "x" in Row 1, Column 1
Saved as a .csv. (or, told it to)
Opened it up in Notepad.
Notepad shows the "x", but no comma after it.
Why ?

The comma is a field __separator__, not a field terminator.

There is no comma after the last field (cell value).

Caveat: You will see a comma after the "last" visible field if the truly
last cell in a row contained the null string.

For the same reason, you might see multiple commas separating fields. The
ones in between represent cells that contained the null string.
 
Back
Top