To schedule a refresh in Excel Power Query, you must either use the built-in "Refresh every X minutes" setting for local files or upload the workbook to OneDrive/SharePoint and use Power Automate for true automated scheduling. Because Excel desktop is a client-side application, it cannot trigger a refresh of a closed file on its own; it requires either the file to be open with a timer active or a cloud-based trigger to handle the update process.

What You'll Need

  • Microsoft Excel (Office 365, 2016, 2019, or 2021 versions).
  • A Power Query connection already established (data imported from a web source, database, or CSV).
  • A Microsoft account with OneDrive or SharePoint access if you intend to schedule refreshes while the file is closed.
  • Power Automate (included with most Business/Enterprise Microsoft 365 plans) for cloud-based scheduling.

Step-by-Step

Method 1: Scheduling Refresh While the File is Open (Local)

This method is best for dashboards that remain open on a monitor throughout the day. Note that labels may differ slightly depending on your version of Excel or regional settings.

  1. Open your Excel workbook and navigate to the Data tab in the top ribbon.
  2. In the Queries & Connections group, click on the Queries & Connections button to open the side pane.
  3. Right-click on the specific query you wish to automate from the list in the side pane.
  4. Select Properties from the context menu. This will open the Query Properties dialog box.
  5. Under the Usage tab, look for the Refresh control section.
  6. Check the box labeled Refresh every and enter the number of minutes you want between each refresh. For example, entering "60" will update the data every hour.
  7. Check the box Refresh data when opening the file to ensure you always start with the most current information.
  8. Click OK to save the settings.

Method 2: Scheduling Refresh While the File is Closed (Cloud)

Since Excel cannot run a background timer when the application is closed, you must move the logic to the cloud using Power Automate.

  1. Save your Excel workbook to a OneDrive for Business or SharePoint Online folder.
  2. Ensure your data is formatted as an Excel Table (Insert > Table) and that the Power Query output is loaded into a table.
  3. Log in to the Power Automate portal via your web browser.
  4. Click Create in the left-hand menu and select Scheduled cloud flow.
  5. Give your flow a name and set the Starting date and time. Under Repeat every, choose your frequency (e.g., every 1 day or every 1 hour).
  6. Click Create. You will be taken to the flow designer.
  7. Click + New step and search for the Excel Online (Business) connector.
  8. Select the action labeled Update a row or, if available in your region/version, the specific Refresh a Power Query action (this is currently rolling out to specific Power BI/Excel integrated environments).
  9. If the direct refresh action is not available, the standard practice is to use a Power BI dataset as a bridge: upload the Excel file to Power BI, schedule the refresh in the Power BI Service, and then link the Excel file back to that Power BI dataset.
  10. Select the Location (OneDrive/SharePoint), the Document Library, and the File you wish to refresh.
  11. Save the flow and turn it on.

Common Mistakes

One of the most frequent errors is confusing "Refresh All" with "Scheduled Refresh." Clicking Refresh All on the Data tab is a manual trigger; it does not establish a recurring schedule. Another common mistake is neglecting the "Refresh data when opening the file" checkbox. Users often set a 60-minute timer but forget that if the file is closed for 24 hours, the first set of data they see upon opening will be stale until the first timer cycle completes.

Many users also attempt to schedule refreshes for files stored on local hard drives (C: drive) using cloud tools. Power Automate cannot "reach into" a private computer's local folder unless a Data Gateway is installed and configured. Without a gateway or cloud storage, the file must be open on the desktop for any timer-based refresh to function.

Another pitfall is ignoring the "Background Refresh" setting. By default, Excel performs refreshes in the background so you can keep working. However, if you have multiple dependent queries, a background refresh might trigger the second query before the first one has finished updating, leading to inconsistent or incomplete data in your final report.

Tips

To optimize performance, disable Enable background refresh for critical queries. To do this, right-click the query > Properties > uncheck "Enable background refresh." This forces Excel to finish the data pull completely before allowing any other action, which is essential when your queries rely on one another in a sequence.

If you are dealing with massive datasets, avoid setting the refresh interval too low. A refresh every 1 minute on a query pulling 100,000 rows from a slow web API can cause Excel to freeze or crash. Aim for a balance between data freshness and system stability.

For those using SharePoint, ensure that the file is not "Checked Out" by another user. If a file is checked out or locked for editing by someone else, the automated cloud refresh will fail because the system cannot gain write-access to the workbook to update the table values.

Troubleshooting

If your scheduled refresh is not working, start with the simplest check: Verify the data source connection. Open the query manually and click Refresh. If you receive a credential error, you need to go to Data > Get Data > Data Source Settings and clear/update your permissions. This often happens when passwords are changed or API tokens expire.

If the cloud flow in Power Automate fails, check the Run History. The most common error is a "File Locked" notification. This happens if you have the file open in the Excel Desktop app while the cloud flow attempts to write to it. Try closing the file and running the flow manually to see if it succeeds.

If the "Refresh every X minutes" setting is ignored, check if your workbook is in Calculation Manual mode. While Power Query operates independently of cell formulas, some dependencies in the sheet may prevent the visual update of the data. Ensure Formulas > Calculation Options is set to Automatic.

If you encounter a "Privacy Level" error during an automated refresh, go to Data > Get Data > Query Options > Privacy. Set the privacy levels to Ignore the Privacy Level settings for this file. This is common when combining data from a local CSV and a web URL, as Excel blocks the merge for security reasons unless you explicitly allow it.

Frequently Asked Questions

Can I schedule a refresh for a file that is completely closed?

Not using standard Excel Desktop settings. You must use Power Automate with the file stored in OneDrive or SharePoint, or use Power BI to manage the refresh schedule for the underlying data.

Does a scheduled refresh use my computer's RAM and CPU?

Yes, if the file is open on your desktop and using the "Refresh every X minutes" setting. If the refresh is handled via the cloud (Power Automate/Power BI), the processing happens on Microsoft's servers, not your local machine.

Why does my Excel freeze during a scheduled refresh?

This usually occurs because the query is processing a large volume of data or the source server is slow. Disabling "Enable background refresh" can sometimes help by making the process linear, though it will lock the UI until the refresh is complete.

Will a scheduled refresh update my Pivot Tables?

Not automatically. Power Query updates the Table it loads into, but Pivot Tables based on that table require a separate refresh. You can solve this by using a small piece of VBA code or by checking the Pivot Table properties to "Refresh data when opening the file."

Can I schedule different refresh times for different queries?

Yes. Each query has its own Properties menu. You can set Query A to refresh every 15 minutes and Query B to refresh every 60 minutes within the same workbook.

Do I need a paid subscription for scheduled refreshes?

The local timer is free with any version of Excel. However, using Power Automate for closed-file refreshes typically requires a Microsoft 365 Business or Enterprise license.