查询 Excel 2010 时诊断 OLEDB 异常 [英] Diagnosing an OLEDB exception when Quering Excel 2010
本文介绍了查询 Excel 2010 时诊断 OLEDB 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要通过 SQL 查询 Excel 表,我曾经使用过:
To query an excel sheet via SQL, I used to use either:
Dim excelConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPath + ";Extended Properties=""Excel 8.0;IMEX=1;HDR=YES;"""
或
Dim excelConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + strPath + ";Extended Properties=""Excel 12.0;IMEX=1;HDR=YES;"""
现在这一切正常,直到我安装了 Office 2010.
Now this worked fine until I installed Office 2010.
现在我得到一个
Microsoft.Ace.OLEDB.12.0 提供程序未在此机器上注册例外.
Microsoft.Ace.OLEDB.12.0 provider is not registered on this machine exception.
如何找到正确的连接字符串/提供者?
How can I find out the correct connection string/provider?
推荐答案
也许您卸载了 Access 数据库引擎 (ACE) 组件?它们仍然可以从 MSDN 作为 2007 Office 系统驱动程序:数据连接组件.
Perhaps you uninstalled the Access Database Engine (ACE) components? They are still available for download from MSDN as 2007 Office System Driver: Data Connectivity Components.
这篇关于查询 Excel 2010 时诊断 OLEDB 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文