在adp.Fill处抛出OleDbException,并说“找不到可安装的ISAM". [英] OleDbException being thrown at adp.Fill saying "Could not find installable ISAM."

查看:49
本文介绍了在adp.Fill处抛出OleDbException,并说“找不到可安装的ISAM".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

        string fileName = "e:\\investigation\\report.xlsx";
        string SHEETNAME_HERE = "Sheet1";
        string connectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES\";", fileName);
        OleDbConnection con = new OleDbConnection(connectionString);
        StringBuilder stbQuery = new StringBuilder();
        stbQuery.Append("SELECT * FROM [" + SHEETNAME_HERE + "]");
        OleDbDataAdapter adp = new OleDbDataAdapter(stbQuery.ToString(), con);

        DataSet dsXLS = new DataSet();
        adp.Fill(dsXLS);

我使用的是Windows 64位,而Office 2010(32位)找不到可安装的ISAM.

I am using Windows 64-bit and Office 2010 (32-bit) is Could not find installable ISAM.

推荐答案

您需要验证是否安装了正确的DLL.IE Msexcl40.dll

You need to verify the correct DLL is installed. IE Msexcl40.dll

请参阅(忽略它表示访问2k并按照解决的步骤进行操作) http://support.microsoft.com/kb/209805

see (ignore it says access 2k and follow the steps for resolving) http://support.microsoft.com/kb/209805

这篇关于在adp.Fill处抛出OleDbException,并说“找不到可安装的ISAM".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆