dhundley
2 years agoRegular Contributor
opentextfile with no line break on last line
i'm using the aqFile.OpenTextFile and the WriteLine to open a text file and write lines to it. according to the smartbear documention for writeline:
Use the WriteLine
method to write the specified value to a text file and insert a line break after the written data.
inserting the line break after the written data is fine for all but my last line. i do not want an extra blank line at the bottom of this file. before i use the Close method, how do i get rid of that extra line?
ok. never mind. figured it out on my own. instead of writeline i have to use write and then on all but the last line tag on an extra "\n" to the print line.