Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Garrett
 
Posts: n/a
Default Save As CSV saves empty rows

I have an XLS worksheet that copies cells from a different worksheet in the
same workbook using the following function "=T(UPPER(<other worksheet
name!<other worksheet cell)). The formula is copied throughout the
worksheet using relative cell reference. When I save the worksheet as a csv
file all of the records that have no data are also saved. What I end up with
in the csv file looks something like this:
data,data,data,data,
,,,,

How do I tell Excel to not save the empty rows?


  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

But those aren't empty cells to excel. They contain formulas that evaluate to
"".

I think I'd copy the non-blank cells to a different worksheet and save from
there.

(But lots of times, this kind of stuff doesn't cause any damage to the importing
program. Are you sure it matters?)

Garrett wrote:

I have an XLS worksheet that copies cells from a different worksheet in the
same workbook using the following function "=T(UPPER(<other worksheet
name!<other worksheet cell)). The formula is copied throughout the
worksheet using relative cell reference. When I save the worksheet as a csv
file all of the records that have no data are also saved. What I end up with
in the csv file looks something like this:
data,data,data,data,
,,,,

How do I tell Excel to not save the empty rows?


--

Dave Peterson
  #3   Report Post  
Garrett
 
Posts: n/a
Default

Dave,

Thanks for your reply. Yeah, I tried and the import program I'm using chokes
pretty hard on the bogus records. I have written a macro in VB that removes
the blank rows and writes the remaining rows to a CSV file. The other option
would be to use a function that clears the cell if the T function returns
"", although I've searched the function list and can't find a function that
will clear the contents of a cell.

Again, thanks for your reply, I was begining to think there are more
questions on this newsgroup than answers.

Garrett

"Dave Peterson" wrote in message
...
But those aren't empty cells to excel. They contain formulas that

evaluate to
"".

I think I'd copy the non-blank cells to a different worksheet and save

from
there.

(But lots of times, this kind of stuff doesn't cause any damage to the

importing
program. Are you sure it matters?)

Garrett wrote:

I have an XLS worksheet that copies cells from a different worksheet in

the
same workbook using the following function "=T(UPPER(<other worksheet
name!<other worksheet cell)). The formula is copied throughout the
worksheet using relative cell reference. When I save the worksheet as a

csv
file all of the records that have no data are also saved. What I end up

with
in the csv file looks something like this:
data,data,data,data,
,,,,

How do I tell Excel to not save the empty rows?


--

Dave Peterson



  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

If I really want empty cells, I'll do a little extra work.

I'll change my formula to return a #n/a.

=if(t(sheet2!a1)="",na(),t(sheet2!a1))

I'm not sure why you're using the =t() function (unless to stop the 0's being
returned from empty cells???).

=if(sheet2!a1="",na(),sheet2!a1)

Then copy|paste special|values
then
Edit|replace
what: #n/a
with: (leave empty)
replace all

But I think you'll still have to reset that last used cell of that worksheet.
http://www.contextures.com/xlfaqApp.html#Unused

to stop the new blanks from being written.

(If I were you, I'd continue using the macro that you have that's working.)


Garrett wrote:

Dave,

Thanks for your reply. Yeah, I tried and the import program I'm using chokes
pretty hard on the bogus records. I have written a macro in VB that removes
the blank rows and writes the remaining rows to a CSV file. The other option
would be to use a function that clears the cell if the T function returns
"", although I've searched the function list and can't find a function that
will clear the contents of a cell.

Again, thanks for your reply, I was begining to think there are more
questions on this newsgroup than answers.

Garrett

"Dave Peterson" wrote in message
...
But those aren't empty cells to excel. They contain formulas that

evaluate to
"".

I think I'd copy the non-blank cells to a different worksheet and save

from
there.

(But lots of times, this kind of stuff doesn't cause any damage to the

importing
program. Are you sure it matters?)

Garrett wrote:

I have an XLS worksheet that copies cells from a different worksheet in

the
same workbook using the following function "=T(UPPER(<other worksheet
name!<other worksheet cell)). The formula is copied throughout the
worksheet using relative cell reference. When I save the worksheet as a

csv
file all of the records that have no data are also saved. What I end up

with
in the csv file looks something like this:
data,data,data,data,
,,,,

How do I tell Excel to not save the empty rows?


--

Dave Peterson


--

Dave Peterson
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
how do i delete empty rows in excel? charlie Excel Discussion (Misc queries) 2 January 19th 05 11:45 AM
empty rows at bottom of worksheet michael g Excel Discussion (Misc queries) 2 January 18th 05 09:17 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM
Remove empty rows in excel? Clbmgr Excel Discussion (Misc queries) 6 December 2nd 04 02:02 AM
Macro to hide rows with empty cells tp58tp Excel Worksheet Functions 2 November 13th 04 02:01 PM


All times are GMT +1. The time now is 09:19 AM.

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

About Us

"It's about Microsoft Excel"