Getting an Extra Empty line when exporting Excel Range to .txt file
问题 I am trying to copy an Excel range to a .txt file. The export is successful, with one exception, It adds one " extra " empty line at the end. I've read and tests many of the solution on SO (and other sites), but still without any success. My Code (relevant part) ' === Export to the .txt file === Dim TxtFileName As String, lineText As String TxtFileName = ThisWorkbook.Path & "\Inv_" & Format(Date, "yyyymmdd") & ".txt" Open TxtFileName For Output As #1 With StockSht For i = 1 To LastRow For j =