Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default blank lines at end

I have a macro that save a particular worksheet as a .csv file. When I open
the resulting file in Notepad, I can see that there are lines of blank
information at the end. That is, there are only commas and nothing else.
This will not work for my purposes. What can I add to my macro to remove
those blank lines at the end of the data? If it is helpful, I can remove all
blank lines, it doesn't have to be only at the end. They can be either
removed on the original worksheet or on the .csv file.

Thanks in advance for your help,
Scott


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default blank lines at end

Any chance you have something in those cells--maybe you had formulas that
evaluated to "" and you converted to values?



"S.E." wrote:

I have a macro that save a particular worksheet as a .csv file. When I open
the resulting file in Notepad, I can see that there are lines of blank
information at the end. That is, there are only commas and nothing else.
This will not work for my purposes. What can I add to my macro to remove
those blank lines at the end of the data? If it is helpful, I can remove all
blank lines, it doesn't have to be only at the end. They can be either
removed on the original worksheet or on the .csv file.

Thanks in advance for your help,
Scott


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default blank lines at end

I think I found the problem. Those cells previously had content. In the
macro I have written I told Excel to clear contents of those cells.
Apparently what I need to do is delete the information instead. I'm going to
experiment with writing a macro that does that. Clear changes the value of
the cells to "0", but leaves them on the worksheet. Delete removes the cells
altogether.

Scott

"Dave Peterson" wrote in message
...
Any chance you have something in those cells--maybe you had formulas that
evaluated to "" and you converted to values?



"S.E." wrote:

I have a macro that save a particular worksheet as a .csv file. When I
open
the resulting file in Notepad, I can see that there are lines of blank
information at the end. That is, there are only commas and nothing else.
This will not work for my purposes. What can I add to my macro to remove
those blank lines at the end of the data? If it is helpful, I can remove
all
blank lines, it doesn't have to be only at the end. They can be either
removed on the original worksheet or on the .csv file.

Thanks in advance for your help,
Scott


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default blank lines at end

Now it works.

Scott

"S.E." wrote in message
...
I think I found the problem. Those cells previously had content. In the
macro I have written I told Excel to clear contents of those cells.
Apparently what I need to do is delete the information instead. I'm going
to experiment with writing a macro that does that. Clear changes the value
of the cells to "0", but leaves them on the worksheet. Delete removes the
cells altogether.

Scott

"Dave Peterson" wrote in message
...
Any chance you have something in those cells--maybe you had formulas that
evaluated to "" and you converted to values?



"S.E." wrote:

I have a macro that save a particular worksheet as a .csv file. When I
open
the resulting file in Notepad, I can see that there are lines of blank
information at the end. That is, there are only commas and nothing else.
This will not work for my purposes. What can I add to my macro to remove
those blank lines at the end of the data? If it is helpful, I can remove
all
blank lines, it doesn't have to be only at the end. They can be either
removed on the original worksheet or on the .csv file.

Thanks in advance for your help,
Scott


--

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
Blank Lines Question Bob[_19_] Excel Discussion (Misc queries) 3 April 10th 12 03:39 AM
How do I ignore blank lines Wendy Excel Discussion (Misc queries) 1 November 28th 07 05:25 PM
Macro not recognizing blank lines as blank pm Excel Discussion (Misc queries) 9 May 22nd 07 04:16 PM
Blank lines David O'brien Excel Programming 2 February 24th 04 06:21 PM
how to automatically insert blank lines in between non-blank lines No Name Excel Programming 2 November 17th 03 03:40 PM


All times are GMT +1. The time now is 01:15 PM.

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"