小编use*_*918的帖子

使用Microsoft.ACE.OLEDB.12.0将Excel导入SQL Server

尝试在SQL Server 2008 r2 64位中打开Excel文件时出现以下错误:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" 
reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider 
"Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
Run Code Online (Sandbox Code Playgroud)

我正在使用以下查询:

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; 
HDR=NO; IMEX=1; Database=\\filepath\filename.xlsx', 'SELECT * FROM [Sheet1$]')
Run Code Online (Sandbox Code Playgroud)

有趣的是,DBA可以毫无问题地运行它.我已经完成并运行了以下查询:

sp_configure 'Show Advanced Options', 1;
RECONFIGURE;
GO …
Run Code Online (Sandbox Code Playgroud)

sql-server excel sql-server-2008

5
推荐指数
2
解决办法
6万
查看次数

标签 统计

excel ×1

sql-server ×1

sql-server-2008 ×1