Could not find installable ISAM

心已入冬 提交于 2019-11-26 12:17:41

问题


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 ?


回答1:


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:




回答2:


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!




回答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.




回答4:


use Extended properties="\excel 8.0;




回答5:


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.



来源:https://stackoverflow.com/questions/4214527/could-not-find-installable-isam

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!