9

I have the following code :

string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\db\suc.xls; Extended Properties=""Excel 12.0;HDR=YES;""";

// Create Connection to Excel Workbook
using (OleDbConnection connection =
             new OleDbConnection(excelConnectionString))
{
    OleDbCommand command = new OleDbCommand
            ("Select * FROM [Sheet1$]", connection);

    connection.Open();

and i get the following error :

Could not find installable ISAM.

at connection.Open() . Any ideas ?

Dyrandz Famador
  • 4,499
  • 5
  • 25
  • 40
Alex
  • 10,869
  • 28
  • 93
  • 165
  • possible duplicate of [System.Data.OleDb.OleDbException: Could not find installable ISAM](http://stackoverflow.com/questions/11562267/system-data-oledb-oledbexception-could-not-find-installable-isam) – bummi Jul 05 '15 at 07:30

7 Answers7

22

I had the same error, but none of the suggestions above worked. In my case all I had to do was to change my connection string to this:

string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FilePath + ";Extended Properties='Excel 12.0;IMEX=1;'";

Note the Single Quote around the Extended Properties attribute ('Excel 12.0;IMEX=1;'). Once I added those single quotes the error disappeared!

DigiOz Multimedia
  • 1,156
  • 1
  • 12
  • 28
4

There's no 64 bit version of the Jet OLEDB drivers, so if you are running this on a 64 bit OS you might need to target x86 in your .NET application and not Any CPU:

alt text

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
3

I was getting this issue trying to opening an xls file with a more recent provider. I fixed this issue by changing my extended properties from

Extended Properties="Excel 11.0;"

to

Extended Properties="Excel 8.0;"

I guess Excel 11 expects an xlsx style file.

squig
  • 755
  • 7
  • 18
1

On 64-bit Windows and 64-bit Office (2010, 2013) environments, there are many reports on this error. The fix or workaround is a bit strange but seems to work for most people out there.

The "Microsoft Access Database Engine 2010 Redistributable" installation package seems the natural one to use but several reports says it does not work.

Instead, using the "2007 Office System Driver: Data Connectivity Components" seems to solve the above problem for most people.

Giridhar
  • 95
  • 2
  • 4
0

use Extended properties="\excel 8.0;

Dyrandz Famador
  • 4,499
  • 5
  • 25
  • 40
ASKA
  • 21
  • 1
  • 6
0

I had the same kind of problem. I was using an Excel 2010 database. But I had a xlsx file instead of xls. I solved my problem using the connection string as fallows,

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=logbook.xlsx;Extended Properties='Excel 12.0;HDR=YES;IMEX=1;';

What I was missing are, I used OLEDB.4.0 instead of ACE.12.0 . I tried using ACE.14.0. But it didn't work either. Then I missed inverted commas ( ' ' ) around Extended Properties.

Sorry if the answer is hard to read, I am uploading this in my phone.

0

// SET A CONNECTION WITH THE EXCEL FILE.

              OleDbConnection myExcelConn = new OleDbConnection
                  ("Provider=Microsoft.ACE.OLEDB.12.0; " +
                      "Data Source=" + Server.MapPath(".") + "\\" + fileUpload1.FileName +
                      ";Extended Properties='Excel 12.0;HDR=YES'");

Putting Single quote in Extended Properties like Extended Properties ='Excel 12.0:HDR=YES' solved my problem.