Forum Discussion
Auto Refresh Power Query in Excel with Web Content Connection
- 1 year ago
Hi IB_rewoP
Why It Doesn’t Work:
- Auto-refresh only works when the Excel file is open. Closing the file stops the refresh.
- "Enable Background Refresh" only allows Excel to continue working while refreshing but doesn’t apply when the file is closed.
Solution:
- Use VBA: Add this code to refresh when the file opens:
Private Sub Workbook_Open() ThisWorkbook.RefreshAll End Sub - Save the file as a macro-enabled workbook (.xlsm).
- Power Automate: Use it to refresh the file if stored in OneDrive/SharePoint.
- Query Properties: Right-click the query in Data > Queries & Connections, select Properties, and check:
- "Refresh every X minutes"
- "Refresh data when opening the file."
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Hello IB_rewoP ,
I assume that you are using excel. So that when ever you open the excel the settings of "Refresh data when opening the file" needs to be enabled.
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |
- IB_rewoP1 year agoFrequent Visitor
no, I didn't want someone to keep having to open the Excel spreadsheet to refresh the data.
My understanding is that checking the Enabling background Refresh mean I do need to have the Excel spreadsheet open as the datasource will refresh automatically - correct?
At the moment, I have to keep the Excel spreadsheet open all the time in order for the data source to refresh.
- uzuntasgokberk1 year ago
Super User
Hello IB_rewoP ,
İf you enable "Refresh Every" option, yes it will be refreshed.Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |