Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel + ADO + Installable ISAM error 1

Status
Not open for further replies.

nealvenables

Programmer
Jun 27, 2002
141
GB
This is driving me nuts!

I'm trying to open an ADO connection to an Excel file, so that I can load the contents of the Excel file into an ADO recordset.

The code looks like this...

Code:
adoCNN_XL.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPath & strFile & ";" & _
"Extended Properties=Excel 8.0;HDR=Yes;"

adoCNN_XL.Mode = adModeRead

adoCNN_XL.Open


adoRST_XL.Open "SELECT * FROM [SHEET1];", adoCNN_XL, adOpenStatic

.. and is failing at the line
Code:
 adoCNN_XL.Open
with everyone's favourite "Could not find installable ISAM" error.

I've followed Microsoft suggestions (checked the MSEXCL40.DLL is registered correctly, reinstalled Office, upgraded MDAC to the latest version) and trawled Tek-Tips and nothing is fixing the issue.

Can anyone shed any light before I take desparate measures!?

btw: system config is NTS 4.0 + SP6, Office 2000 SR1 + SP4, MDAC 7.1, JET 4.0 SP3
 
nealv,

Can't answer your issue about the error you are seeing, but maybe the following can be used to circumvent the problem altogether.

Have you evaluated or tried using a DSN connection as opposed to the full connect string as you were doing? Along those lines, here are a couple of pages that may help you, if getting connectivity now is the requirement as opposed to ferreting out the source of your problems.

ADO to Query Data from a Closed Excel Workbook

ExcelADO Demonstrates How to Use ADO to Read and Write Data in Excel Workbooks

How to set up a System DSN

Sample on how to use it...All be it Access, but same works for excel

Hope this helps.
DougCranston
 
Thanks Doug.

Excellent suggestion and excellent resources too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top