problem opening excel file thru ADO
Hello all,
i've got this piece of code to open an excel spreadsheet using ADO, which has been working ok uptill now...
VB Code:
cnExcel.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFilePath & ";" & "Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""
cnExcel.CursorLocation = adUseClient
cnExcel.Open
rstImport.Open "SELECT * FROM [Sheet1$]", cnExcel, adOpenStatic, adLockReadOnly
i've error trapped it and get an "unspecified error" on the last line.
I'm using MDAC 2.7 (ADO 2.6) and i can't work out what the problem is coz i haven't changed the excel file... :confused:
any ideas?
darrel.