Sub TEST()
Dim xFile$, Arr(1 To 6000, 1 To 3), N&, L
ActiveSheet.UsedRange.Offset(1, 0).EntireRow.Delete
xFile = ThisWorkbook.Path & "\Oracle.txt"
If Dir(xFile) = "" Then MsgBox "文字檔不存在! ": Exit Sub
Open xFile For Input As #1
While Not EOF(1)
Line Input #1, L
If Mid(L, 32, 7) = "-30001-" Then
N = N + 1
Arr(N, 1) = Trim(Left(Right(L, 18), 9))
Arr(N, 2) = Trim(Mid(L, 46, 40))
Arr(N, 3) = Trim(Right(Trim(Left(L, Len(L) - 20)), 15))
End If
Wend
Close #1
[A2].Resize(N, 3) = Arr
End Sub