Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Haonan
Frequent Visitor

Problem when using RelativePath option of Web.Contents() for excel files on Sharepoint

Hi,

The problem I faced was very similar to the one here.

 

I need to access an excel file on sharepoint, and the entire url is like:

 

"https://xxxxxx.sharepoint.com/sites/SBM/Lists/db_Ist/Attachments/68/stand Juli 22/07/xlsx"

 

The account I was using to sign in has full access to this path.

 

Since the path is dynamic, my code is as follows:

 

let
  #"open_table" = Excel.Workbook(Web.Contents("https:/xxxxx.sharepoint.com",
                                 [RelativePath =
                                 "sites/SBM/Lists/db_Ist/Attachments/68/stand Juli 22.07.xlsx"]))
in
  #"open_table"

 

 

and then i got the error:

微信图片编辑_20220805150604.jpg

 

I tried the solution in the above link, change the URL by replacing https with http, then i got:

微信图片编辑_20220805151117.jpg

i cant even sign in with my account.

 

Does anybody know of an other way to go about doing this? Thanks a lot!!

 

1 REPLY 1
lbendlin
Super User
Super User

1. clear global permissions for that data source and re-authenticate.

2. Don't use the web connector. Use the Sharepoint Folders connector.  There you can handle the dynamic file names much easier.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors