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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
masplin
Impactful Individual
Impactful Individual

connecting to Excel file on Sharepoint using web address

Hi

 

I've got a model working fine using the locla path ot asharepoint excel file, but need ot switch it to the web version to publish. 

 

If i go to sharepoint online and copy the link i get this

 

https://cxxxxxxxxxxxxxxxxxxxltd.sharepoint.com/:x:/r/sites/PowerBIReporting/Shared%20Documents/Agenc... 

 

This just says url invalid. I chopped off the bit after xlsx and get request failed. I took out the :x/r/sites/ and get Web.Contents failed ot get contents form this but with a /$value on the end

 

Oddly if I look at sharepoint the folder is "Power BI Reporting" with spaces but this link has no spaces. Elsewhere ther spaces are replaced with %20.  i tried that and no better

 

So the question is what is the correct syntax to read an excel file  if the local path is U:\Sharepoint\CxxxxxxxxxxxxxxxxxxLtd\Power BI Reporting - Documents\Agency Fee Pattern to Sep20.xlsx

 

Thanks any advice as should be really simple

Mike

1 ACCEPTED SOLUTION
masplin
Impactful Individual
Impactful Individual

Found it sorry. You have to get the url out of excel not out of sharepoint!!!

 

Excel.Workbook(Web.Contents(https://cxxxxxxxxxxxxxxxxxltd.sharepoint.com/sites/PowerBIReporting/Shared%20Documents/Agency%20Fee%...), null, true) works

View solution in original post

3 REPLIES 3
masplin
Impactful Individual
Impactful Individual

Found it sorry. You have to get the url out of excel not out of sharepoint!!!

 

Excel.Workbook(Web.Contents(https://cxxxxxxxxxxxxxxxxxltd.sharepoint.com/sites/PowerBIReporting/Shared%20Documents/Agency%20Fee%...), null, true) works

Hi I am trying to connect to a Excel file in a web page but  I can´t do it, please help.

 

http://portalbissrs.xm.com.co/hdrlg/_layouts/15/WopiFrame.aspx?sourcedoc={B3385EEE-113F-4105-ABD4-9B...

 

My issue was my data was stored in a Sharepoint location and I couldn't work out how to get power BI to conenct ot it. Where is your file being stored?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors