ADODB Connection with Excel stored on Sharepoint (https)

109 Views Asked by At

I am trying to use Excel VBA to import data from an Excel file that is stored on Sharepoint. I am using ADODB-Connection for this. When importing data from a locally saved Excel file, everything works as desired. However, the connection to Excel on Sharepoint fails.

My previous procedure

Sharepoint URL:
https://company.sharepoint.com/Shared Documents/General/topic1 & topic2/Landscape/Data_Dashboard/external_data.xlsx

Converted URL: \\company.sharepoint.com\Shared%20Documents\General\topic1%20%26%20topic2\Landscape\Data_Dashboard\external_data.xlsx

Dim Connection as New ADODB.Connection
Dim constring as String
constring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\company.sharepoint.com\Shared%20Documents\General\topic1%20%26%20topic2\Landscape\Data_Dashboard\external_data.xlsx;Extended Properties=Excel 12.0;HDR=Yes;IMEX=1;"
Connection.Open constring

With this procedure I get the following error message:

Runtime error '-2147467259 (80004005)':
The 'Open' method for the '_Connection' object failed

I have already found and tried to implement many posts on this topic, unfortunately without success.

0

There are 0 best solutions below