Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2003 & csv file 1

Status
Not open for further replies.

jlawler

Programmer
Feb 26, 2003
14
IE
Hi,
I've an issue saving a csv file in Excel 2003 SP2. I've created an 11 field file in Excel and saved it as csv. In this file some of the fields will not always be populated and it's often fileds 9 -11 that are left un-populated. Excel maintains csv format fine for the first 16 records regardless of what fileds are populated. However from record 17 onwards, if filed 11 is not populated then the trailing commas are not inserted. This can be tested by opening in notepad.

e.g.
Line No 15 - Joe,Bloggs,M,147852,111122,L,A,01/01/2007,,,41
Line No 16 - Jane,Bloggs,F,147852,111122,L,A,01/01/2007,,,
Line No 17 - Jack,Bloggs,M,147852,111122,L,A,01/01/2007
Line No 18 - Jill,Bloggs,F,147852,111122,L,A,01/01/2007

Is there anything that can be done to ensure that trailing commas are always inserted regardless of whether the fields are populated. (like they are for the first 16 records). Has anybody encountered this issue before? Has anyone a decent work-around. This file will be processed by an application to add records to a database.

Any help appreciated.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top