Deleting blank lines from text file

J

Joey Martin

I have a text file being create with the FileSystemObject. It's being
built based on results from a SQL query. All this is working fine, but
so that I have a carriage return VBCRLF at the end of each row, I have
an empty row at the end of my text file. How do I delete this last line?

Here is the end of my script:
csvText=csvText & vbcrlf
rs.movenext
loop

How should I do this? Thanks!!
 
E

Evertjan.

Joey Martin wrote on 30 aug 2005 in
microsoft.public.inetserver.asp.general:
I have a text file being create with the FileSystemObject. It's being
built based on results from a SQL query. All this is working fine, but
so that I have a carriage return VBCRLF at the end of each row, I have
an empty row at the end of my text file. How do I delete this last line?

Here is the end of my script:
csvText=csvText & vbcrlf
rs.movenext
loop

csvText = left(csvText, len(csvText)-2)
How should I do this? Thanks!!

not tested
 

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

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top