Sub ExportRows()
' Set reference to library: Tools -> Reference -> Microsoft Scripting Runtime
Dim i As Long, sPath As String
Dim fso As New FileSystemObject, txtFile As TextStream
sPath = ThisWorkbook.Path & "\"
' Adjust start cell. Mine is A1
For i = 1 To Range("A").End(xlDown).Row
Set txtFile = fso.CreateTextFile(sPath & "text" & i & ".txt")
txtFile.WriteLine Cells(i, 1)
txtFile.Close
Next
End Sub
How do you want the data formatted?
Do you went it delimited anyway?
Perhaps comma separated.
Where is your data located? My code assumes that you data is in column A. It takes all cell's content and saves to text file.
Sub ExportRows()
' Set reference to library: Tools -> Reference -> Microsoft Scripting Runtime
Dim i As Long, sPath As String
Dim fso As New FileSystemObject, txtFile As TextStream
sPath = ThisWorkbook.Path & "\"
' Adjust start cell. Mine is A1
For i = 1 To Range("A").End(xlDown).Row
Set txtFile = fso.CreateTextFile(sPath & "text" & i & ".txt")
txtFile.WriteLine Cells(i, "A") & "; " & _
Cells(i, "B") & "; " & _
Cells(i, "C") & "; " & _
Cells(i, "D")
txtFile.Close
Next
End Sub