Fix Power Query Showing Duplicate or Phantom SharePoint Files in Excel
Question details
Excel Power Query identifies multiple rows for a single key because it detects a duplicate or phantom file in a SharePoint folder that isn't visible in the regular interface.

- Product
- Microsoft Excel, SharePoint
- Device & OS
- not provided
- Scenario
- Importing and transforming data from a SharePoint folder using Power Query in Excel.
- Observed behavior
- Power Query displays two entries with identical file names and metadata, causing key matching errors. Deleting the visible file in SharePoint does not remove the phantom duplicate from the query results.
Before escalating to support, try clearing your Excel Power Query cache and verify that the SharePoint site's recycle bins (both first and second stage) do not contain hidden versions of the file.
Contact Microsoft 365 Support for Metadata Inspection
Since phantom files are often caused by backend synchronization issues or stale SharePoint metadata, a Microsoft 365 administrator must open a service request.
When a file appears in Power Query but not in SharePoint or File Explorer, the issue usually lies deep within the SharePoint environment's metadata caching.
Microsoft Support engineers have the necessary backend tools to inspect and repair the corrupted metadata causing these duplicate entries.
Have your organization's Microsoft 365 administrator log in to the Microsoft 365 admin center using their administrator credentials.
On the left-hand navigation menu, click on 'Support' and then select 'Help & support' or 'New service request'.
Detail the issue, mentioning that Power Query is pulling phantom or duplicate files from a SharePoint folder due to suspected stale metadata, and submit the ticket for a support engineer to review.

Clear Power Query Cache and Refresh
Sometimes the duplicate file is temporarily stuck in your local Power Query cache rather than being a permanent SharePoint issue.
Switch to WPS Office for a Seamless Spreadsheet Experience
If you are tired of dealing with complex backend syncing issues and phantom file errors in Microsoft Office, consider trying WPS Office. It provides a lightweight, highly compatible alternative for managing your spreadsheets and data efficiently without the hassle.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded file and follow the quick on-screen instructions to install the suite.
- 3. Open Your Excel Files: Launch WPS Spreadsheets and open your existing .xlsx files with full formatting and formula support.

Frequently Asked Questions
Why does Power Query show duplicate files that aren't in SharePoint?
This is typically caused by stale SharePoint metadata, hidden items trapped in the site's recycle bin, or background synchronization errors that haven't fully cleared from the server.
Can deleting the visible file fix the phantom duplicate in Power Query?
Usually, no. If Power Query is reading a phantom file due to stale metadata, deleting the visible file will only remove the legitimate entry, leaving the duplicate or phantom entry intact in your query results.
How do I check if the duplicate is hiding in the SharePoint Recycle Bin?
Open your SharePoint site in a web browser, navigate to the 'Recycle bin' on the left menu, and look for deleted versions of the file. If you are an admin, check the 'Second-stage recycle bin' at the bottom of the page as well.




