Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Blank Lines Question | Excel Discussion (Misc queries) | |||
How do I ignore blank lines | Excel Discussion (Misc queries) | |||
Macro not recognizing blank lines as blank | Excel Discussion (Misc queries) | |||
Blank lines | Excel Programming | |||
how to automatically insert blank lines in between non-blank lines | Excel Programming |