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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
niyati_61
Helper III
Helper III

Power BI - Connecting to a Live Excel Doc Data Source

Hello @d_gosbell,

 

Currently I have this Live Excel Document - it refreshes the data when you click on the Refresh button, it directly takes the data from the company SQL database. And the the data gets refreshed in this Excel Doc.

niyati_61_0-1646292531447.png

After connecting this Excel Document through Get Data - Excel in Power BI. Now, when I click on the Refresh button in the Excel doc and it refreshes the data; I click on Refresh Preview in Power BI too, but it did not refresh the data in PBI?

 

How do you connect a live Excel sheet like that in Power BI so that the data refreshes when the excel refreshed too?

 

Also, how does this refreshing work in Power BI Desktop for report server?

 

Thanks in advance!

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@niyati_61 wrote:

How do you connect a live Excel sheet like that in Power BI so that the data refreshes when the excel refreshed too?

 


It's actually better to not do this at all. The "Get Data" in Excel is using the same Power Query engine that Power BI uses (although a much older version). So the best approach is to edit the query in Excel, go into the advanced view, then copy all the text. Then go into Power BI, create a new blank query, go into advanced view and replace the text that is in there with the text you copied from Excel. Then Power BI will be connected directly to SQL and you can cut out the need for the Excel file in the middle.

 

One of the problems with your current approach is that the Power BI Excel connector reads the contents of the Excel file off disk. So if you click refresh, but do not save the file then Power BI will read an old copy of the data. And Power BI just reads the contents of the Excel file. It does not know there is another query behind the data and it has no way of triggering the refresh button.

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User


@niyati_61 wrote:

How do you connect a live Excel sheet like that in Power BI so that the data refreshes when the excel refreshed too?

 


It's actually better to not do this at all. The "Get Data" in Excel is using the same Power Query engine that Power BI uses (although a much older version). So the best approach is to edit the query in Excel, go into the advanced view, then copy all the text. Then go into Power BI, create a new blank query, go into advanced view and replace the text that is in there with the text you copied from Excel. Then Power BI will be connected directly to SQL and you can cut out the need for the Excel file in the middle.

 

One of the problems with your current approach is that the Power BI Excel connector reads the contents of the Excel file off disk. So if you click refresh, but do not save the file then Power BI will read an old copy of the data. And Power BI just reads the contents of the Excel file. It does not know there is another query behind the data and it has no way of triggering the refresh button.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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