Microsoft ACE OLEDB provider throws could not find installable ISAM exception
Asked Answered
E

5

10

I'm trying to read Excel spreadsheets with a 64bit Process. Therefore I use the 64 bit Version of Micorosft Access Database Engine 2010.

The following code

var cs = @"Provider=Microsoft.ACE.OLEDB.12.0;"
         + @"Data Source=C:\test.xls;"
         + @"Extended Properties=""Excel 14.0;""");

con = new OleDbConnection(cs);
con.Open();

throw an Exception:

Could not find installable ISAM

Using google I found a lot of questions about this exception. But they refer to JET and seem not apply to my problem.

Any recommendations?

Ebon answered 20/8, 2010 at 13:50 Comment(3)
Did you ever find a solution to this? I have having the same problem.Valentinavalentine
I didn't find a solution, yet.Ebon
SELECT * FROM OPENROWSET('MSDASQL', 'DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);DBQ=D:\SampleOffice2007.xlsx', 'SELECT * FROM [Drivers$]')Encrimson
R
2

The link to "This Article" is correct, However change Single quotes to Double Quotes. I'm using a OpenFileDialog to get any excel file. (I'm using Excel 2013 for testing)

=> Original Format in the post <=
//Newer version, any xls file "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=’C:\AlmostAnyExcelVersionFileRunningUnder64BitOS.xls’;Extended Properties=’Excel 12.0;HDR=NO;IMEX=1;’;"

=> Corrected Format <=
XLConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Chr(34) & ExceilFileDialog.FileName & Chr(34) & ";Extended Properties=" & Chr(34) & "Excel 12.0;HDR=NO;IMEX=1;" & Chr(34) & ";"

Rissole answered 25/1, 2017 at 20:24 Comment(0)
M
1

I came into the same problem today. My configuration is:

  • x64 .NET 2.0 Desktop Application which reads an XLSX file.
  • x64 version of Microsoft Access Database Engine 2010 Redistributable
  • My connection string included the Extended Properties attribute with the value "Excel 14.0;", as the documentation from the component reads.

I had exactly the same problem you have: Could not find installable ISAM exception. I solved it after I came across this article which states that there's a bug on the component's documentation of MS' site. I'm not sure if the component's documentation is inaccurate, what I can say is that changing Extended Properties to Excel 12.0 Xml solved the problem.

Mallorca answered 13/7, 2011 at 19:8 Comment(0)
E
1

I was having exactly the same problem, trying to get data from an Excel 2007 .xlsx file.

The normally reliable "Microsoft.ACE.OLEDB.12.0" drivers simply refused to connect, throwing the same "Could not find installable ISAM" error which you've been seeing.

Eventually, I found this code, which worked:

SELECT * FROM OPENROWSET('MSDASQL',
    'DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);
     DBQ=D:\Sample.xlsx', 'SELECT * FROM [Sheet1$]')

Hope this helps !

(Adapted from the final posting in this thread: SQLTeam.com)

A little while later...

Now, suddenly, my original connection string is working. This was failing earlier (before I successfully connected using the MSDASQL string above) but now works successfully.

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 
    'Excel 12.0;Database=D:\Sample.xlsx;HDR=NO;IMEX=1', 
    'SELECT * FROM [Sheet1$]')

Odd, very odd.

Encrimson answered 13/1, 2012 at 8:36 Comment(0)
R
1

After adding quotation marks to my connection string, ISAM error disappeared (code below).

string GetConnectionString(string fileName)
{
    return "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileName + ";Extended   Properties=\"Excel 12.0;HDR=YES;\"";
}
Rother answered 15/5, 2014 at 8:25 Comment(0)
B
1

I found installing 2013 office with excel and tools and keeping prior versions intact. Then doing a custom install... then open 2013 excel once and then close it. Then goto control panel and add remove features removing excel from 2013. Then open 2010 excel and let it do a quick refresh install of itself and then it works without error.

Bhopal answered 11/1, 2017 at 18:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.