【问题标题】:Alternative to Microsoft ODBC Drivers for 64-bit Windows 7 machine (get Excel data to SQL)用于 64 位 Windows 7 机器的 Microsoft ODBC 驱动程序的替代品(将 Excel 数据获取到 SQL)
【发布时间】:2015-03-24 16:50:58
【问题描述】:

问题:

我一直在尝试获取一个简单的应用程序/存储过程/sql 查询/任何东西,以便在我的 64 位 Windows 7 机器上将数据从 excel 电子表格中提取到 MS SQL Server 2012。

我的 IT 部门安装了 Microsoft Office 2010,它与我独立安装的 Microsoft Access OLEDB 驱动程序(称为 Microsoft.Ace.OLEDB.12.0)不兼容。

尝试安装 64 位 OLEDB 驱动程序时,安装程​​序出现以下错误:

我尝试使用 SQL OPENROWSET 查询通过现有的 32 位驱动程序提取数据:

 SELECT * FROM OPENROWSET('Provider=Microsoft.ACE.OLEDB.12.0', 
   'Extended Properties=Excel 12.0;
   Data Source=c:\path\to\excel\spreadsheet.xlsx',
   [Sheet1$]);

sp_configure 'Ad Hoc Distributed Queries',1
go
reconfigure with override
go SELECT * FROM OPENROWSET ('Microsoft.Ace.OLEDB.12.0','Excel 12.0; Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=c:\path\to\excel\spreadsheet.xlsx; Extended Properties=''EXCEL 12.0;HDR=NO;IMEX=1','SELECT * FROM [Sheet1$]') AS exl

导致以下错误:

The 32-bit OLE DB provider "Microsoft.Ace.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.

或:

 The OLE DB provider "Provider=Microsoft.ACE.OLEDB.12.0" has not been registered.

问题:

  1. 还有哪些其他驱动程序(如果有)可供我使用来代替也与 32 位 Office 安装兼容的 Microsoft.Ace.OLEDB.12.0 驱动程序?

  2. (如果没有答案。1)谁能告诉我卸载32位office是否可以安装和使用64位驱动程序? (要确保我不会浪费 MS Office 和我的时间)。

谢谢大家!

【问题讨论】:

  • 不确定你是否了解 C#,但我使用 EPPlus 将数据从 Excel 推送到 SQL。
  • 我愿意,但尽量保持在最复杂的 sql 或 c++ 中。
  • 看看这是否对你有帮助,大约在页面的一半。 sqlwithmanoj.com/tag/microsoft-ace-oledb-12-0
  • @Dbloch,表示用户必须卸载 Office 32 位并重新安装 64 位。这就是我要做的。谢谢 :) 这是迄今为止我读过的信息量最大的网站。

标签: sql-server sql-server-2012 64-bit odbc


【解决方案1】:

看看这是否对你有帮助,大约在页面的一半。

http://sqlwithmanoj.com/tag/microsoft-ace-oledb-12-0/

【讨论】:

猜你喜欢
  • 2011-10-15
  • 2012-09-03
  • 2010-11-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-03-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多