Excel Power Query SharePoint Folder Shows Old Files Only: Fix
🔍 WiseChecker

Excel Power Query SharePoint Folder Shows Old Files Only: Fix

You connect Excel Power Query to a SharePoint folder expecting to see all current files, but the preview pane shows only outdated files. This problem occurs because Power Query caches the folder listing from a previous session and does not refresh it automatically. This article explains why the cache causes the stale view and provides the exact steps to force a fresh pull from SharePoint.

Key Takeaways: Refresh Power Query SharePoint Folder Cache

  • Data > Queries & Connections > Right-click query > Properties > Usage tab: Clear the cache by toggling the refresh settings.
  • Data > Refresh All > Refresh: Manually refresh the query after clearing the cache to pull the live SharePoint folder listing.
  • Power Query Editor > Home > Data Source Settings > Clear Permissions: Remove cached credentials and folder metadata to force a full re-authentication and fresh scan.

ADVERTISEMENT

Why Power Query Shows Old Files From a SharePoint Folder

When you create a Power Query connection to a SharePoint folder, Excel stores a local cache of the folder structure and file list. This cache includes file names, modified dates, and folder paths. The cache is designed to speed up subsequent loads by avoiding a full network request every time you open the workbook. However, the cache does not automatically expire or refresh when files are added, deleted, or updated on SharePoint. If the workbook was last refreshed hours or days ago, the cached list becomes stale and shows old files only.

The root cause is that Power Query treats the SharePoint folder connection as a static snapshot unless you explicitly tell it to refresh. The cache lives in the workbook’s internal data model, not in SharePoint’s version history. This means that simply closing and reopening the workbook does not fix the problem. You must manually clear the cache and refresh the query.

Where the Folder Cache Is Stored

The folder listing cache is part of the query metadata inside the workbook. It is not a separate file on your hard drive. Each time you run a refresh, Power Query checks the cache first. If the cache exists and the query has not been marked for full refresh, Power Query returns the cached list. This is by design for performance, but it causes the stale file problem when SharePoint content changes between refreshes.

Steps to Clear the Cache and Refresh the SharePoint Folder

To fix the issue, you need to clear the cached folder listing and force Power Query to pull the current data from SharePoint. Follow these steps in order.

  1. Open the Queries & Connections pane
    In Excel, go to the Data tab. In the Queries & Connections group, click Queries & Connections. The pane opens on the right side of the window.
  2. Locate the SharePoint folder query
    In the pane, find the query that connects to your SharePoint folder. It typically has a name matching the folder name or the connection name you set when you created the query.
  3. Open query properties
    Right-click the query name and select Properties. A dialog box with three tabs opens.
  4. Go to the Usage tab
    Click the Usage tab. This tab controls how the query handles caching and refresh. Look for the section labeled Cache or Load options. In some Excel versions, the option is called Enable fast data load or Use cache. Uncheck the box next to it. This tells Power Query to ignore the cached folder listing on the next refresh.
  5. Clear data source settings
    Close the Properties dialog. Go to the Data tab and click Queries & Connections again if the pane closed. Right-click the query, then select Edit. The Power Query Editor opens. In the editor, go to Home > Data Source Settings. In the dialog, select your SharePoint connection and click Clear Permissions. Confirm the action. This removes cached credentials and metadata.
  6. Refresh the query
    Close the Power Query Editor. Back in Excel, go to the Data tab and click Refresh All. Excel prompts you to sign in to SharePoint again. Enter your credentials. Power Query now scans the SharePoint folder live and shows all current files, including new ones.
  7. Verify the file list
    After the refresh completes, check the folder listing in the Queries & Connections pane or in the worksheet where you loaded the data. The list should match what you see when you browse the SharePoint folder in a web browser.

Alternative Method: Delete and Recreate the Query

If the steps above do not work, delete the existing query and create a new one. In the Queries & Connections pane, right-click the query and select Delete. Then go to Data > Get Data > From File > From SharePoint Folder. Enter the SharePoint site URL and folder path. This creates a fresh connection with no cached data.

ADVERTISEMENT

If the Folder Still Shows Old Files After Refreshing

Power Query Caches the Folder Structure at the Site Level

Sometimes the cache persists at the SharePoint site level, not just at the query level. In Power Query Editor, go to Home > Data Source Settings. Select the SharePoint site URL (not the individual folder). Click Clear Permissions. This forces a full re-authentication and a fresh scan of the entire site. Then refresh the query again.

The Workbook Was Opened in Read-Only Mode

If the workbook is opened as read-only, Excel prevents Power Query from writing new cache data. This can cause the query to fall back to an older cached version. Save a copy of the workbook to your local drive, close the read-only version, and open the local copy. Then perform the refresh steps again.

SharePoint Folder Permissions Changed

If your account no longer has access to the folder, Power Query may fail to refresh and silently show the old cached list. Verify your access by opening the SharePoint folder in a web browser. If you cannot see the files there, contact your SharePoint administrator to restore permissions.

Clear Cache vs Clear Permissions: Key Differences

Item Clear Cache (Usage Tab) Clear Permissions (Data Source Settings)
What it removes Cached folder file list and metadata Stored credentials and site-level metadata
When to use Files are missing or outdated but you can still authenticate Authentication fails, credentials are wrong, or the site structure changed
Effect on refresh Forces a fresh folder scan but keeps your sign-in session Forces a full re-authentication and fresh folder scan
Speed Faster because it reuses the existing authentication token Slower because it requires a new sign-in

You can now force Power Query to show the current SharePoint folder listing by clearing the cache and refreshing the query. As a next step, set a refresh schedule in Power Query so the folder listing updates automatically. To do this, right-click the query, select Properties, go to the Usage tab, and check Refresh every. Set an interval such as 15 minutes. For advanced control, use the Data > Queries & Connections > Properties > Background refresh option to allow refreshes while you continue working.

ADVERTISEMENT