使用 OPENROWSET 导入 Sharepoint Excel 文件

问题描述

我正在尝试使用以下 OPENROWSET 语句将 Excel (xlsx) 文件从我们的 MS Sharepoint 站点导入到我们的 sql Server 2012 中:

SELECT * FROM OPENROWSET (          
            'Microsoft.ACE.OLEDB.12.0','Excel 12.0;Database=\\MycompanyName.Sharepoint.com\directory\file name.xlsx','SELECT * FROM [Sheet Name$]'
)

返回(通用)错误

 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,Line 1
 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked    server "(null)".

我假设语法正确,并且由于 Sharepoint 访问/权限问题而失败。 sql 服务在本地系统帐户下运行:

enter image description here

因此,我认为 Sharepoint 拒绝了该请求,因为它认为该请求来自某个本地系统帐户,而不是我 (John.Smith@MyCompany.com)。

我使用自己的凭据更改了 sql 服务“登录身份”,它接受了该凭据,但在尝试重新运行 OPENROWSET 语句时仍然抛出上述相同的错误

enter image description here

还要补充一点,我也是 sharepoint 站点管理员。它只允许我添加具有有效电子邮件地址的用户。如果我要创建域服务帐户,不确定是否可以将其添加到共享点成员列表中。

enter image description here

有什么帮助吗?!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)