csv format

S

Steve C

I am trying to save a workbook in csv format so that I can upload into
another program.
The problem I have is that when I view in notebook i have many trailing
commas which have to bemanually deleted.
Is there a way that I can format my excel workbook before saving to file
type csv to prevent this from happening?
 
J

JLatham

The added commas are representing information in columns that Excel thinks
have something. That can happen if even only a single cell on one row way
out in "right field" contains a value, or if the cells contain white space
such as tabs or spaces.

If you're convinced those extra columns do not have data in them, try this:
(you may want to try this on a copy of the workbook or worksheet just in case)
Select all of the columns beyond the last one with data you want to export.
Use Edit | Delete to delete the entire column(s). At this point it should
work, but if not do that again but before exporting, close the file and then
reopen it and export the data.

If any of this becomes impractical for some reason (you have data out there,
but don't want to delete it and don't want to export it either), then set up
a second worksheet (Sheet2) and set up links in the cells on it back to the
real sheet for just the data area you do want to export.

Lets say you have data of some sort or another on Sheet1 beginning at A1 and
going on over and down to AB1004. But you only want to export columns A
through G. On Sheet2 you could set this formula into cell A1
='Sheet1'!A1
and then fill it over to column G and then fill that row of formulas on down
to row 1004. Then export Sheet2 instead of Sheet1.

Hope this helps some.
 
S

Steve C

Thank you, this has corrected the problem

JLatham said:
The added commas are representing information in columns that Excel thinks
have something. That can happen if even only a single cell on one row way
out in "right field" contains a value, or if the cells contain white space
such as tabs or spaces.

If you're convinced those extra columns do not have data in them, try this:
(you may want to try this on a copy of the workbook or worksheet just in case)
Select all of the columns beyond the last one with data you want to export.
Use Edit | Delete to delete the entire column(s). At this point it should
work, but if not do that again but before exporting, close the file and then
reopen it and export the data.

If any of this becomes impractical for some reason (you have data out there,
but don't want to delete it and don't want to export it either), then set up
a second worksheet (Sheet2) and set up links in the cells on it back to the
real sheet for just the data area you do want to export.

Lets say you have data of some sort or another on Sheet1 beginning at A1 and
going on over and down to AB1004. But you only want to export columns A
through G. On Sheet2 you could set this formula into cell A1
='Sheet1'!A1
and then fill it over to column G and then fill that row of formulas on down
to row 1004. Then export Sheet2 instead of Sheet1.

Hope this helps some.
 
J

JLatham

Glad I could help, and thanks for the feedback and letting us know that it
cleared things up for you.
 

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