Power Query in Excel: How to Manually Refresh Data
In this article
To manually refresh Power Query in Excel, go to the Data tab on the ribbon and click Refresh All to update every query in the workbook, or right-click a specific query table and select Refresh to update only that dataset. This process forces Excel to reconnect to the original data sources, re-run the transformation steps defined in the Power Query editor, and load the most current results into your spreadsheet. This is essential when the source files, databases, or web pages have changed since the last time the file was opened or updated.
What You'll Need
- An Excel workbook containing existing Power Query connections or loaded tables.
- Active access to the original data sources (e.g., the source CSV file must be in the same folder path, the SQL server must be reachable, or the website must be online).
- The necessary permissions or credentials to access those data sources.
- A stable internet connection if your data is hosted in the cloud or on a remote server.
Step-by-Step
- Open your Excel Workbook: Launch the file that contains the Power Query connections you wish to update. Ensure the file is not in "Protected View" (usually indicated by a yellow bar at the top); if it is, click "Enable Editing" first.
- Choose your Refresh Method: Depending on whether you want to update everything or just one specific part of your report, choose one of the following paths. Note that menu labels may differ slightly depending on your version of Excel or region.
- Method A: Refresh All (Global Update):
- Click on the Data tab in the top ribbon.
- In the Queries & Connections group, click the Refresh All button.
- Alternatively, you can use the keyboard shortcut Ctrl + Alt + F5 to trigger a global refresh of all data connections in the workbook.
- Method B: Refresh Single Table (Targeted Update):
- Locate the table in your worksheet that was created by Power Query.
- Right-click anywhere inside the data cells of that table.
- From the context menu that appears, select Refresh. This will only update the specific query tied to that table, which is faster if you have a very large workbook with many unrelated data sources.
- Method C: Refresh via the Queries & Connections Pane:
- Go to the Data tab and click Queries & Connections. This opens a side pane on the right of your screen listing every query in the file.
- Hover your mouse over the specific query you want to update.
- Click the Refresh icon (the circular arrow) that appears next to the query name.
- Monitor the Background Refresh: Look at the status bar at the bottom of the Excel window. You will see a message saying "Running background query..." along with a progress indicator. Do not close the workbook until this process completes to avoid data corruption or incomplete loads.
- Verify the Results: Once the loading indicator disappears, check your table for updated values, new rows, or changed dates to ensure the refresh was successful.
Common Mistakes
One of the most frequent errors is attempting to refresh data while the source file is open in another program that locks the file. For example, if your Power Query pulls from a CSV file and that CSV is currently open in a text editor that prevents sharing, Excel may return an "Access to the path is denied" error. Always ensure source files are closed or shared correctly before refreshing.
Another common mistake is ignoring the "Background Refresh" setting. By default, Excel refreshes queries in the background, allowing you to keep working. However, if you have a macro (VBA) that relies on the refreshed data, the macro might run before the data has actually finished updating. In these cases, users often think the refresh failed when, in reality, the script just moved faster than the data load.
Users also frequently forget to update the file path when moving a workbook to a different folder or sharing it with a colleague. If the query is looking for C:\Users\YourName\Documents\Data.xlsx and your colleague opens it on their machine, the refresh will fail because that specific folder path does not exist on their computer. This requires updating the source settings in the Power Query editor.
Tips
To speed up your workflow, you can configure queries to refresh automatically upon opening the file. Right-click a query in the Queries & Connections pane, select Properties, and check the box for Refresh data when opening the file. This removes the need for a manual click every time you start your workday.
If you are dealing with massive datasets that take several minutes to load, consider disabling "Enable background refresh" in the Query Properties. While this will freeze Excel until the refresh is complete, it ensures that any subsequent steps or formulas based on that data are calculated using the absolute latest information without timing conflicts.
For those managing multiple queries that depend on one another (e.g., Query B uses the output of Query A), be aware that Refresh All generally handles the dependency chain correctly. However, refreshing a single "downstream" table manually may not always trigger a refresh of the "upstream" source query, potentially leading to inconsistent data. When in doubt, use Refresh All.
Troubleshooting
If the refresh does not go to plan, start with the simplest checks. First, verify your connection. If the data is coming from a website or a cloud folder (like SharePoint or OneDrive), ensure you are logged in and have a stable internet connection. A momentary drop in Wi-Fi can cause a "Data source error."
If you receive a "Formula.Firewall" error, this usually happens when Power Query tries to combine data from two different sources (like a local file and a web API) and the privacy levels are conflicting. To fix this, go to Data > Get Data > Query Options, navigate to Privacy, and select Ignore the Privacy Levels. Note that you should only do this if you trust both data sources.
When you encounter a "Column not found" or "The key didn't match any rows in the table" error, it means the structure of your source data has changed. For example, if a column header was renamed from "Sales_2023" to "Sales_2024" in the source file, Power Query will fail because it is specifically looking for the old name. To resolve this, you must open the Power Query Editor, find the "Applied Steps" pane on the right, and locate the step where the error occurs (usually the "Promoted Headers" or "Changed Type" step). Click the gear icon next to that step to update the column reference or edit the M-code in the formula bar.
If Excel becomes completely unresponsive during a refresh, it may be due to a memory bottleneck. Try reducing the amount of data being loaded by adding a "Filter" step in the Power Query Editor to remove unnecessary rows or columns before the data hits the Excel worksheet.
Frequently Asked Questions
Why is my Refresh All taking so long?
Refresh speed depends on the volume of data, the complexity of your transformation steps, and the speed of the source connection. Large SQL queries or web scrapes are naturally slower than local CSV files.
Can I refresh Power Query on Excel for Web?
Yes, but with limitations. Refreshing in the browser typically requires the data source to be cloud-based (like SharePoint, OneDrive, or an Azure SQL database). Local file paths on your C: drive cannot be refreshed via the web version.
Does refreshing data overwrite my manual changes in the table?
Yes. Power Query tables are "read-only" outputs. If you manually type a value into a cell within a Power Query table, that change will be wiped away the next time the query refreshes, as the table is completely rebuilt from the source.
How do I change the source file for a query?
Go to the Data tab, click Queries & Connections, right-click your query, and select Edit. Once in the Power Query Editor, click the gear icon next to the Source step in the "Applied Steps" pane to browse for a new file.
Is there a way to refresh only one specific column?
No. Power Query refreshes the entire dataset associated with that query. You cannot refresh a single column or row independently of the rest of the table.
What is the difference between Refresh and Refresh All?
Refresh updates only the selected table or query. Refresh All updates every single data connection, Power Pivot model, and Power Query table within the entire workbook.