CODE: [Copy to clipboard]
Set fso = CreateObject("Scripting.FileSystemObject")
startTime = Timer
s = ""
Set f = fso.OpenTextFile("~$tmp01$.txt")
Do Until f.AtEndOfStream
char1 = ""
Do Until f.AtEndOfLine
If f.Column = 421 Then
char1 = f.Read(1)
Exit Do
End If
f.Skip 1
Loop
s = s & char1
f.SkipLine
Loop
f.Close
MsgBox "利用 Column 属性得出结果 " & s & " 耗时 " & Timer - StartTime & " 秒。"
startTime = Timer
s = ""
Set f = fso.OpenTextFile("~$tmp01$.txt")
Do Until f.AtEndOfStream
t = f.ReadLine()
s = s & Mid(t, 421, 1)
Loop
f.Close
MsgBox "利用 Mid 函数得出结果 " & s & ", 耗时 " & Timer - StartTime & " 秒。"