用ADO直接读写Excel: Dim oConn As New ADODB.Connection Dim oRS As New ADODB.Recordset With oConn .Provider = "Microsoft.Jet.OLEDB.4.0" .Properties("Extended Properties").Value = "Excel 8.0" .Open "C:\Book1.xls" oRS.Open "Select * from [Sheet1$]", oConn, adOpenStatic '.... oRS.Find .... '.... oRs.Close .Close End With
Dim oConn As New ADODB.Connection
Dim oRS As New ADODB.Recordset
With oConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Extended Properties").Value = "Excel 8.0"
.Open "C:\Book1.xls"
oRS.Open "Select * from [Sheet1$]", oConn, adOpenStatic
'....
oRS.Find ....
'....
oRs.Close
.Close
End With