#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default To GS Re .csv Commas

Bob presented the following explanation :
Why is there no comma after the 600, which is the last cell used in each row
? Shouldn't there be per your reply ?


As my reply states, there is no comma after the 2nd "x" because (as
joeu2004 points out thoroughly well) it's the last piece of data in the
row. As Claus states, if there's any of the characters he mentions in
cells following the cell containing '600' then you will see more
commas.

As Bruce states, the values are *separated* by commas meaning the
commas act as deliminators of the data fields. Delimiters separate the
fields in the file! (Contrary to Bruce's assertion that a CSV is NOT a
comma delimited values file; when in fact it is<g)

So here's an example that sums up what everyone is trying to convey...

x,x,,,x

...where there are 5 data fields of which only the first 2 and last 1
contain data. Say, for example, you have the following data table...

FirstName,LastName,Address1,Address2,State/Prov,Zip,Phone1,Phone2,Fax,Email

...which is the headings row of the data table. Note there are 9 commas,
and the last field doesn't have a comma. Now look at a sample record
from the data table...

John,Doe,123 Main St.,Apt 101,CA,12345-6789,1234567890,,1234567891,

...where the data fields for Phone2 and Email are empty. This demos the
'proper' construction (headings row followed by records) of a CSV (or
any delimited data file) atored as plain text. This structure will
enable DAO/ADO and any other ODBC tools to read the data from the file
same as if it was reading it from a database.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.csv Commas ? Bob[_19_] Excel Discussion (Misc queries) 2 December 12th 12 05:50 PM
between commas Jacob Skaria Excel Programming 1 April 25th 09 08:15 AM
between commas [email protected][_2_] Excel Programming 0 April 25th 09 07:24 AM
So many commas Alan[_5_] Excel Worksheet Functions 2 May 24th 07 07:44 PM
help commas before data James Excel Discussion (Misc queries) 5 March 8th 05 06:25 PM


All times are GMT +1. The time now is 04:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"