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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cassidy
Power Participant
Power Participant

Refresh Excel Pivots within Service

I've published an Excel Report, with a Power BI Dataset Connection, to a Premium Workspace.  

 

The report has a Pivot Table connected to my Power BI Dataset that needs to be refreshed daily, however I don't see a function while viewing the report in Service to Refresh the table. 

  • Before the very recent Excel Online/BI update, I'd always get the "can't refresh from a Power BI source" error.  That's now gone, hence why I'm attempting this.

 

I would prefer the "Schedule Refresh" option that was noted when I imported the book from One Drive, but not seeing that anywhere either.

 

cassidy_0-1627662152260.png

 

The workspace claims I don't have any Workbooks with a Data Model.

cassidy_1-1627662499254.png

 

 

1 ACCEPTED SOLUTION

Hello @v-xiaotang , thanks for the reply.

 

Part of that helped me find a solution.  

 

Since the file is on OneDrive, if it gets refreshed, then Power BI will pick up the changes...cool.  I still need to refresh the Excel file automatically.  

 

I added a script to the Excel Workbook to Refresh it and then created a Power Automate scheduled flow to run the Script.

 

Goes like this:  Power Automate runs Script > Excel workbook refreshes Power BI Dataset connection and Pivots > Power BI Service picks up the Excel workbook change

 

Here was the script I used:

 

function main(workbook: ExcelScript.Workbook) {
  // Refresh all data connections
  workbook.refreshAllDataConnections();
}

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @cassidy 

I guess you might need to build model in Excel firstly,

vxiaotang_1-1627884026266.png

but it has a simpler way to solve this question ——> import the excel file into PowerBI Desktop, then upload this pbix file.  You will get a dataset that can set scheduled refresh.

-

besides, if you import file from Onedrive, the file will update automatically when it detects changes. so you won't find "Schedule Refresh" option of this file.

https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-csv-file-onedrive

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Hello @v-xiaotang , thanks for the reply.

 

Part of that helped me find a solution.  

 

Since the file is on OneDrive, if it gets refreshed, then Power BI will pick up the changes...cool.  I still need to refresh the Excel file automatically.  

 

I added a script to the Excel Workbook to Refresh it and then created a Power Automate scheduled flow to run the Script.

 

Goes like this:  Power Automate runs Script > Excel workbook refreshes Power BI Dataset connection and Pivots > Power BI Service picks up the Excel workbook change

 

Here was the script I used:

 

function main(workbook: ExcelScript.Workbook) {
  // Refresh all data connections
  workbook.refreshAllDataConnections();
}

hi, I'm newbee

could you please explain me where (and how) put the code?

tx raffaele

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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