To fix a query that is not updating in Excel, you must first verify that the data source path is still valid and then trigger a manual refresh via the Data tab. Most update failures occur because the source file was moved, renamed, or the connection settings are preventing the background refresh from completing. By resetting the connection properties and ensuring the source is accessible, you can restore the automatic flow of data into your spreadsheet.
What You'll Need
- An Excel workbook containing a Power Query (Get & Transform) connection.
- Administrative access to the source data (e.g., the folder where the CSV or Excel source file is stored, or login credentials for a database).
- A stable internet connection if the query pulls data from a web source or cloud-based folder.
Step-by-Step
Depending on the cause of the freeze, you may need to try these steps in order. Note that menu labels may differ slightly based on your version of Excel or your region.
- Perform a Manual Refresh
Before diving into settings, attempt a forced refresh. Go to the Data tab on the top ribbon. Click the Refresh All button. This forces Excel to attempt a connection to every query in the workbook. If a dialogue box appears with an error, take note of the specific error code, as this indicates whether the problem is a missing file, a permission issue, or a data type mismatch. - Verify the Data Source Path
If the source file was moved or renamed, the query will fail silently or throw a "Data source not found" error. To fix this, go to the Data tab and select Queries & Connections. This opens a pane on the right side of the screen. Right-click the problematic query and select Edit. This opens the Power Query Editor. In the Applied Steps pane on the right, click the gear icon next to the Source step. Check the file path or URL. If it is incorrect, click Browse to locate the file in its new position and click OK. - Adjust Background Refresh Settings
Sometimes a query seems like it isn't updating because it is running in the background and hasn't finished yet, or it is conflicting with another query. To change this: Go to the Data tab > Queries & Connections. Right-click your query and select Properties. In the Usage tab, uncheck the box that says Enable background refresh. By disabling this, Excel will freeze the UI until the data is fully loaded, ensuring that the update actually completes before you attempt to use the data. - Check Privacy Level Settings
When combining data from two different sources (e.g., a local Excel file and a website), Excel may block the update due to "Privacy Levels." To resolve this, go to File > Options and Settings > Query Options. In the left-hand menu, under the Global section, select Privacy. Select the option Always ignore Privacy Level settings. Click OK and attempt to refresh the data again. - Clear Data Cache
Corrupted cache files can prevent new data from appearing. Go to File > Options and Settings > Query Options. Under the Global section, select Data Load. Look for the Data Cache Management Options section and click Clear Cache. This forces Power Query to pull a fresh copy of the data from the source rather than relying on a potentially corrupted local snapshot. - Validate Data Types
If the source data has changed (e.g., a column that used to be numbers now contains text), the query may fail during the "Changed Type" step. Open the Power Query Editor by right-clicking the query and selecting Edit. Look through the Applied Steps for any steps marked with a red exclamation mark. If you find one, click the step and check if a column header was renamed in the source file. If so, rename the column in the source or update the step formula to match the new name.
Common Mistakes
One of the most frequent mistakes is renaming the source file or the worksheet within the source file without updating the query. Power Query looks for a specific file name and a specific sheet name; if either changes, the connection breaks. Another common error is leaving the source file open in another application that locks the file, preventing Excel from reading the data during a refresh.
Users also frequently forget to save the changes made within the Power Query Editor. After fixing a path or a data type, you must click Close & Load in the top left corner of the editor for the changes to be applied to the actual spreadsheet. Simply closing the window without loading will revert the query to its previous, broken state.
Tips
To prevent future update issues, use Power Query Parameters for file paths. Instead of hard-coding a path like "C:\Users\Name\Documents\Data.xlsx", create a parameter that allows you to change the folder path in one central location for all queries in the workbook. This is especially helpful when moving files between different computers or shared network drives.
Additionally, consider using Table objects (Ctrl+T) for your source data. If your query points to a named Table rather than a specific range of cells (like A1:G50), the query will automatically expand to include new rows added to the table, eliminating the need to manually adjust the range in the query settings.
Troubleshooting
If the query still refuses to update after following the steps above, try these advanced checks in order of complexity:
1. Test with a New Workbook: Create a brand new Excel file and attempt to connect to the same data source. If the new file works, the issue is likely a corruption within the original workbook's metadata. If the new file also fails, the issue is with the source file permissions or the network connection.
2. Check Folder Permissions: If the data is stored on a company server or OneDrive/SharePoint, ensure your account still has "Read" permissions for that specific folder. If your password was recently changed, you may need to clear your permissions. Go to Data > Get Data > Data Source Settings. Find the source in the list, select it, and click Clear Permissions. Then, refresh the query and sign in again when prompted.
3. Update Excel: Ensure you are running the latest version of Microsoft 365 or your standalone version of Excel. Power Query is updated frequently, and certain bugs related to web connectors or database drivers are often fixed in monthly patches. Check for updates via File > Account > Update Options.
4. Check for Circular References: Ensure your query is not loading data into a table that is then used as a source for the same query. This creates a circular dependency that can cause the refresh process to hang or fail without a clear error message.
Frequently Asked Questions
Why does my query update slowly?
Slow updates are usually caused by "heavy" steps like merging large tables or performing complex filtering on millions of rows. To speed this up, try to perform as much filtering as possible in the first few steps of the query to reduce the amount of data Excel has to process in memory.
Can I make the query update automatically every few minutes?
Yes. Go to Data > Queries & Connections, right-click your query, and select Properties. Under the Refresh control section, check Refresh every X minutes and enter your desired interval.
What is the difference between Refresh and Refresh All?
Refresh updates only the specific table or pivot table currently selected. Refresh All updates every single query, connection, and pivot table in the entire workbook simultaneously.
Why do I get a "Formula.Firewall" error?
This happens when Power Query tries to combine data from two different sources with different privacy levels. The solution is to go to Query Options and set the Privacy Levels to Ignore, as described in the step-by-step section.
Will updating the query overwrite my manual changes in the table?
Yes. If you have manually typed data into the cells of a table that is loaded from a query, those manual changes will be overwritten the next time the query refreshes. Always make data changes in the source file, not in the output table.