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
stribor45
Post Prodigy
Post Prodigy

Source as a file on OneDrive

I was wondering if I can somehow make my excel file on OneDrive curently set up like below more flexibile

 

    Source = Excel.Workbook(File.Contents("C:\Users\myusername\OneDrive\Names.xlsx"), null, true),
    sheet1_Sheet = Source{[Item="sheet1",Kind="Sheet"]}[Data],

 Above is a problem if I use different computer to open my PBI as my OneDrive is mapped differently on dofferent computer.

Also service has issue refreshing my report with "local files" set up like this

1 ACCEPTED SOLUTION
danextian
Super User
Super User

hi @stribor45 

 

​To access on-premises or local data sources in Power BI, you must install a data gateway on a machine that has continuous access to the data file and remains online. This gateway facilitates secure data transfer between your local environment and the Power BI service.

However, if your data resides in OneDrive for Business or SharePoint, you can bypass the need for a data gateway by using the direct URL of the file and connecting through Power BI Desktop's Web connector.

Source = Excel.Workbook(Web.Contents("https://myorg.sharepoint.com/sites/sitename/folderpath/filename.xlsx"), 
null, true),
sheet1_Sheet = Source{[Item="sheet1",Kind="Sheet"]}[Data],

danextian_0-1744610339236.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
v-sdhruv
Community Support
Community Support

Hi @stribor45 ,
Just wanted to check if you had the opportunity to review the solution provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

danextian
Super User
Super User

hi @stribor45 

 

​To access on-premises or local data sources in Power BI, you must install a data gateway on a machine that has continuous access to the data file and remains online. This gateway facilitates secure data transfer between your local environment and the Power BI service.

However, if your data resides in OneDrive for Business or SharePoint, you can bypass the need for a data gateway by using the direct URL of the file and connecting through Power BI Desktop's Web connector.

Source = Excel.Workbook(Web.Contents("https://myorg.sharepoint.com/sites/sitename/folderpath/filename.xlsx"), 
null, true),
sheet1_Sheet = Source{[Item="sheet1",Kind="Sheet"]}[Data],

danextian_0-1744610339236.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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