All columns not being recognized in .csv file.

G

Guest

I have an .xls spreadsheet with 34 columns, all of which may or may not
include data. Data is entered on each line, but each line contains many
blank cells. When I save the file as a .csv file, all the columns are not
recognized. When viewed in notepad, some lines contain 28 commas; others
have the 34. If I import this file into my application, it returns many
errors for wrong number of columns. Has anyone run into this problem and
found a solution? Thanks.
 
D

Dave Peterson

Saved from a previous post:

This might describe the problem of too many commas in CSV files:

http://support.microsoft.com/default.aspx?scid=77295
Column Delimiters Missing in Spreadsheet Saved as Text

(It actually describes missing delimiter, but if some are "missing", maybe the
ones appearing are "extra".)

(But a lot of programs (excel included) don't care about those extra columns.
Maybe you don't have to care, either???)

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)
 
G

Guest

Thanks, Dave. I may have to go this route. I do need the exact number of
columns for my upload, regardless of the cell content. If I put a space in
each empty cell, then it recognizes the column. Unfortunately, that's not a
solution. I have too many empty cells, and it would mess up my upload.
Thanks for the tip. I'll look into it. Have a good day.

Patricia
 
D

David F Cox

Are the cells "blank" or Empty?

when I try with empty cells I get no comma, when I enter a single space in
them I get a comma, when I format them as Text I get a comma, even if there
is nothing in them.
 

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