简体   繁体   English

将数据(.xls 文件)导入 SQL 服务器 - 我收到此错误

[英]Import data (.xls file) into SQL Server - I get this error

TITLE: SQL Server Import and Export Wizard TITLE: SQL 服务器导入导出向导
The operation could not be completed.操作无法完成。

ADDITIONAL INFORMATION:附加信息:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. 'Microsoft.ACE.OLEDB.12.0' 提供程序未在本地计算机上注册。 (System.Data) (系统.数据)

A 64-bit version of the 'Microsoft Access Database Engine 2010 Redistributable' that will allow you to use the 'Microsoft.ACE.OLEDB.12.0' provider is available here:可在此处获得允许您使用“Microsoft.ACE.OLEDB.12.0”提供程序的 64 位版本的“Microsoft Access Database Engine 2010 Redistributable”:

http://www.microsoft.com/en-us/download/details.aspx?id=13255 http://www.microsoft.com/en-us/download/details.aspx?id=13255

If you use the download from the accepted answer, you will need to build for x86, as pointed out如果您使用已接受答案的下载,则需要为 x86 构建,如所指出的

Few suggestions to avoid the installation of drivers.避免安装驱动程序的一些建议。 There are few options.选项很少。

  1. Save the excel file as CSV and then try to import it, using import export wizard.将 excel 文件保存为 CSV 然后尝试使用导入导出向导导入它。 CSV is basically text file and you don't need specific drivers. CSV 基本上是文本文件,您不需要特定的驱动程序。
  2. BCP IN the CSV file into the table. BCP 在 CSV 文件中放入表中。
bcp.exe {TableName} IN "{PathToCSVFile}" -c -T -t , -S {SQLServerName}

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

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