Fix Excel Power Query File In Use Error on OneDrive
Question details
The user encounters a 'file is in use by another process' error when trying to refresh Power Query reports and PivotTables in an Excel workbook synced to OneDrive or SharePoint.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- Windows 11
- Scenario
- Refreshing a workbook that contains self-referencing Power Queries while background cloud synchronization is active.
- Observed behavior
- Excel reports that the file is being used by another process, which blocks the Power Query data refresh from completing successfully.
Ensure you have saved your current progress and verify the synchronization status of your OneDrive app before attempting to change sync settings or file locations.
Pause OneDrive Synchronization During Data Refresh
Temporarily halting the cloud sync process prevents the OneDrive service from locking the file while Excel's Power Query attempts to read and refresh the internal data.
This error is primarily caused by a conflict between a self-referencing query (a query that reads data from the same Excel file) and the cloud sync service attempting to upload the file simultaneously.
Click the OneDrive cloud icon located in the Windows system tray (bottom-right corner of your taskbar).
Click on the 'Help & Settings' gear icon, select 'Pause syncing', and choose '2 hours' from the dropdown menu.
Return to your Excel workbook, navigate to the 'Data' tab, and click 'Refresh All' to update your Power Query and PivotTables without conflicts.
Once the refresh is complete and the file is saved, open OneDrive again and click 'Resume syncing' to upload your updated workbook to the cloud.

Test the Workbook in a Local Directory
Moving the file outside of a synced folder determines if the issue is strictly isolated to OneDrive/SharePoint synchronization.
Open a Microsoft Support Request
Since this is a known product bug related to self-referencing queries and cloud synchronization, submitting a support ticket may be necessary for corporate environments to receive a lasting workaround.
Try WPS Office for Seamless Spreadsheet Management
Since this Power Query synchronization issue stems from deep Microsoft Excel and OneDrive process conflicts, consider using WPS Office as a free, lightweight, and easy-to-use alternative. It offers excellent compatibility with Microsoft formats and provides a smooth, reliable experience for your daily spreadsheet tasks.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your Windows device.
- 2. Install and Launch: Follow the quick installation wizard, then open WPS Spreadsheets.
- 3. Manage your Data: Open your existing .xlsx workbooks securely in WPS Office to analyze and process your data efficiently.

Frequently Asked Questions
Why does Excel say my file is in use during a Power Query refresh?
This error occurs when a Power Query reads data from the same workbook it is housed in (self-referencing), while a cloud service like OneDrive or SharePoint attempts to sync the file in the background, creating a file lock conflict.
Can I permanently fix this without pausing OneDrive?
A common structural workaround is to separate your data. Keep your raw source data in one workbook and your Power Query reports in a different workbook. This stops the workbook from referencing itself during a refresh, preventing the file lock.
Does this issue only affect corporate SharePoint networks?
No. This conflict also affects personal devices, such as Windows 11 Home computers, that utilize personal OneDrive accounts for cloud synchronization.




