简体   繁体   English

将Excel数据导入SQL Server 2005

[英]Importing Excel data into SQL Server 2005

Below SQL Query is fine when I execute in SQL Server 2008 but it is not working in SQL Server 2005. 当我在SQL Server 2008中执行但在SQL Server 2005中不起作用时,下面的SQL Query很好。

SELECT * INTO "12-2014" FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\ImportExcel\Test.xls', ['12-2014$'])

I am getting this error. 我收到此错误。

Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

Can anyone help please? 有人可以帮忙吗?

this thread should help you. 线程应该可以为您提供帮助。

essentially this: 本质上是这样的:

First, I want to inform that, Import and Export Data (32-bit) is the default export tool when you right click a database to export data. 首先,我想通知您,右键单击数据库以导出数据时,“导入和导出数据(32位)”是默认的导出工具。 Let's perform the following steps to export data from SQL Server to Excel with Import and Export Data (64-bit): 让我们执行以下步骤,使用导入和导出数据(64位)将数据从SQL Server导出到Excel:

  1. Click Start, All Programs, Microsoft SQL Server 2008 folder, Import and Export Data (64-bit). 单击“开始”,“所有程序”,“ Microsoft SQL Server 2008”文件夹,“导入和导出数据”(64位)。
  2. In “Choose a Data Source” step, please choose “SQL Server Native Client” as Data source, and specify your Server name and Database, then click next. 在“选择数据源”步骤中,请选择“ SQL Server Native Client”作为数据源,并指定服务器名称和数据库,然后单击“下一步”。
  3. In “Choose a Destination” step, please choose “Microsoft Office 12.0 Access Database Engine OLE DB Provider”, and then click “Properties…” 在“选择目的地”步骤中,请选择“ Microsoft Office 12.0 Access数据库引擎OLE DB提供程序”,然后单击“属性…”。
  4. In “Data Link Properties”, under “Connection” tab, please fill out the Date Source (the excel file location, for example: D:\\Temp\\temp.xlsx); 在“数据链接属性”的“连接”选项卡下,请填写日期源(excel文件位置,例如:D:\\ Temp \\ temp.xlsx); under “All” tab, please double click “Extended Properties”, and input “Excel 12.0” (without quotation) as its property value, return to “Connection” tab and click “Test Connection” and we will receive a message stating the connection succeeded, click “OK”. 在“所有”选项卡下,请双击“扩展属性”,然后输入“ Excel 12.0”(不带引号)作为其属性值,返回“连接”选项卡并单击“测试连接”,我们将收到一条消息,指出连接成功后,单击“确定”。
  5. Click “Next” until the step “Select Source Tables and Views”, please select the table you want to export there and then click “Next”. 单击“下一步”,直到“选择源表和视图”步骤,请选择要在此处导出的表,然后单击“下一步”。
  6. Follow the wizard and finish the process. 按照向导并完成该过程。

You can also refer to the following link which shows how to import data from Excel to SQL Server with screenshots: 您还可以参考以下链接,该链接显示了如何使用屏幕截图将数据从Excel导入SQL Server:

http://hrvoje.piasevoli.com/2010/09/01/importing-data-from-64-bit-excel-in-ssis/ http://hrvoje.piasevoli.com/2010/09/01/importing-data-from-64-bit-excel-in-ssis/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM