当Quering Excel 2010时诊断OLEDB异常 [英] Diagnosing an OLEDB exception when Quering Excel 2010
本文介绍了当Quering 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.
这篇关于当Quering Excel 2010时诊断OLEDB异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文