回复 2楼 风吹过b
你这种方法不实用。将文本作为数据库进行检索,应该很快。
程序代码:
Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") strPathToTextFile = "C:\Scripts\" strFile = "Test.txt" objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & strPathtoTextFile & ";" & _ "Extended Properties=""text;HDR=NO;FMT=Delimited""" objRecordSet.Open "Select DISTINCT * FROM " & strFile, _ objConnection, adOpenStatic, adLockOptimistic, adCmdText ……………………………… ……………………