.csv Commas ?

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.
 
G

GS

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
 
J

joeu2004

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top