Sub OpenTextFileTest Const ForReading = 1, ForWriting = 2, ForAppending = 3 Dim fs, f dim str as string dim i as integer dim index as integer Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.OpenTextFile ( "c:\testfile.txt",ForReading ,TristateFalse) str=f.ReadLine
Mid(sTemp,instr(1,sTemp,"="))
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
dim str as string
dim i as integer
dim index as integer Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile ( "c:\testfile.txt",ForReading ,TristateFalse)
str=f.ReadLine
str=f.ReadLine
i=instr(1,str,"=")
index=cint(mid(str,i+1))
str=f.ReadLine
i=instr(1,str,"=")
left=cint(mid(str,i+1))
....
f.Close
End Sub
用ado 2.6(好象2.1也可以)的recordset对象就可以读取
不仅格式严谨,还不容易出错要示例吗?给我写邮件[email protected]