air1access
Technical User
I have a text file that is exported from our mainframe system everyday.. The problem this file is some-what formatted... I need to fix the format so its a clean file for importing into access...
I need for it to read each line, and only print the line if it meets certain criteria... Where I'm hung up is when a line is completely blank & there is no text what so ever on that line.. How do I get the code to "skip" these lines and move to the next line...???
Below is what I'm working with...
Any suggestions or examples..??
Thanks in advance..!!
air1access
Do Until EOF(1)
Line Input #1, strLine
'E or S Task Types
If Left(strLine, 2) = "E " _
Or Left(strLine, 2) = "S " Then
strType = strLine
Print #2, strType
'This line is the Task intervals
Line Input #1, strLine
If Left(strLine, 7) <> " " Then
strType = strLine
Print #2, strType
'This line is the Task Accomplish
Line Input #1, strLine
If Left(strLine, 1) <> " " Then
strType = strLine
Print #2, strType
'This line is the Planning Notes
Line Input #1, strLine
If Left(strLine, 1) Like Space(1) Then
strLine.SkipLine
ElseIf Left(strLine, 1) <> " " Then
strType = strLine
Print #2, strType
End If
End If
End If
End If
Loop
I need for it to read each line, and only print the line if it meets certain criteria... Where I'm hung up is when a line is completely blank & there is no text what so ever on that line.. How do I get the code to "skip" these lines and move to the next line...???
Below is what I'm working with...
Any suggestions or examples..??
Thanks in advance..!!
air1access
Do Until EOF(1)
Line Input #1, strLine
'E or S Task Types
If Left(strLine, 2) = "E " _
Or Left(strLine, 2) = "S " Then
strType = strLine
Print #2, strType
'This line is the Task intervals
Line Input #1, strLine
If Left(strLine, 7) <> " " Then
strType = strLine
Print #2, strType
'This line is the Task Accomplish
Line Input #1, strLine
If Left(strLine, 1) <> " " Then
strType = strLine
Print #2, strType
'This line is the Planning Notes
Line Input #1, strLine
If Left(strLine, 1) Like Space(1) Then
strLine.SkipLine
ElseIf Left(strLine, 1) <> " " Then
strType = strLine
Print #2, strType
End If
End If
End If
End If
Loop