This code will read a file line by line and create a comma delimited text file which can then be imported into Excel.
Original Author: Howard Lee
Inputs
FileRead = File To be read as input
FileOutPut = file that will be created as output
Code
Private Sub Form_Load ()
Dim instring As String
Dim outstring As String
On Error GoTo Clnup
Open "FileRead.txt" For Input As #1 ' file opened for reading
Open "FileOutPut.txt" For Output As #2 ' file created
Line Input #1, instring
While Not EOF(1)
Line Input #1, instring
If Len(outstring) = 0 Then
outstring = instring
Else
outstring = outstring & "," & instring
End If
Wend
Print #2, outstring
Close #1
Close #2
Clnup:
Close
End
End Sub