logo
search
Power Query Problems

How to Fix Power Query Prevents Saving Excel Workbook While Source is Open

Elise WilliamsElise Williams Oct 7, 2026 869 views

Question details

The user is unable to save an Excel workbook because Power Query is actively connected to another source workbook that is currently open, resulting in a file-locking error.

How to Fix Power Query Preventing Excel Workbook Saves
Product
Microsoft Excel
Device & OS
not provided
Scenario
Trying to save a destination workbook containing a Power Query connection while the source workbook is simultaneously open.
Observed behavior
Excel throws a file-locking error and prevents the user from saving changes to the destination workbook until the source file is closed.
Before you start

Ensure that you have saved any unsaved manual changes in both workbooks to a temporary file or copied them to your clipboard to prevent data loss before closing the locked files.

Solution 1Recommended

Close the Source Workbook Before Saving

The most direct way to resolve the Power Query file-locking issue is to close the source file being queried.

Power Query places a lock on the source workbook during data retrieval to prevent structural changes or data corruption. Closing the source file releases this lock immediately.

1
Switch to the source workbook

Navigate to the source workbook (often referred to as File B) that your Power Query is pulling data from.

2
Save manual changes

Click 'File' and then 'Save' to ensure any manual changes you have made in this source file are safely stored.

3
Close the source file

Close the source workbook completely by clicking the 'X' in the top right corner of the window.

4
Save the destination workbook

Return to your destination workbook (File A) that contains the Power Query and click 'Save' or press Ctrl+S.

Close the Source Workbook Before Saving
Quick Fix: Once the source file is closed, the file lock is released, allowing the destination workbook to save normally.
Free Microsoft Office alternative

Use WPS Office for Seamless Data Management

If you frequently encounter file-locking issues or performance lags with complex Excel queries, try WPS Office. It is a free, lightweight, and highly compatible alternative that handles multiple workbooks smoothly without heavy background processes.

  1. 1. Download the installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install WPS Office: Run the downloaded installer and follow the quick on-screen instructions to set up the software.
  3. 3. Open your workbooks: Launch WPS Spreadsheet and open your existing .xlsx files directly with full format compatibility.
Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv).Lightweight installation with fast startup and low memory consumption.Familiar user interface makes transitioning from MS Office effortless.Supports advanced data processing, pivot tables, and complex lookup formulas.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query lock my Excel file?

Power Query establishes a dedicated data connection that actively reads the source file. To prevent data corruption or structural shifts during this read process, Excel places a lock on the file, which prevents simultaneous saves while both files are communicating.

Can I refresh a Power Query connection while the source file is open?

Yes, you can often refresh the query while the source file is open. However, attempting to save the destination file or making structural changes to the source file during an active connection is what usually triggers the file-lock error.

How do I forcibly remove a file lock in Excel?

The safest and easiest way to remove a file lock caused by Power Query is to close the source workbook. If the lock persists, you may need to cancel any active background query refreshes from the Data tab or restart Excel entirely to clear stuck background processes.

Will changing file permissions solve the Power Query lock issue?

Changing the source file to 'Read-Only' can bypass the lock. Because the system knows you won't be writing new data to the source file, it allows the destination file's query to execute and save without raising a conflict.