sql语句查询excel 2003表,求一sql语句
一个excel表格,4列,6万行左右。
例表:
A B C D0 1 1 51 2 3 20 7 1 63 2 2 20 6 3 73 1 1 7
Dim lsSql As String Dim lrRec As ADODB.Recordset Dim ldbConn As New ADODB.Connection ldbConn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=Excel Files;DBQ=" & "c:\1.xls; DefaultDir=c:\ ;DriverId=790;MaxBufferSize=2048;PageTimeout=5;" ldbConn.Open lsSql = "SELECT * " lsSql = lsSql & "......." Set lrRec = New ADODB.Recordset lrRec.CursorLocation = adUseClient lrRec.Open lsSql, ldbConn, adOpenForwardOnly, adLockReadOnly