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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Is there any way to REFRESH the Power BI using VBA?

Is there any way to refresh the Power BI using VBA?
I want to refresh the BI every time Refresh excel, but there is no way to download Gatway. I know that VBA can be used to perform tasks in Browsers, such as logging in to social networks or accessing programs that use some script. Is there a way to do this in POWER BI? Is there a script that helps with Refresh and BI publishing?

 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Just to follow up on @VahidDM  suggestion, if you use the Excel file in Onedrive (using the link to the cloud), you can either refresh manually or let Power BI do an hourly automatic refresh. (So no gateway needed). 

onedrive refresh.png

 

 Source: https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-desktop-file-onedrive 


Here is a video from Guy in a Cube which shows how to set up the connection

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

Just to follow up on @VahidDM  suggestion, if you use the Excel file in Onedrive (using the link to the cloud), you can either refresh manually or let Power BI do an hourly automatic refresh. (So no gateway needed). 

onedrive refresh.png

 

 Source: https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-desktop-file-onedrive 


Here is a video from Guy in a Cube which shows how to set up the connection

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






VahidDM
Super User
Super User

HI @Anonymous 

 

You can not use VBA to refresh your Power BI Dataset/Report.

You can use the Gateway or move your excel file to the SharePoint or Onedrive and then use Power Automate to update/refresh the power BI dataset/report.

 

Refresh your Power BI dataset using Microsoft Flow

Data refresh in Power BI

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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