How to Fix Power Automate Reporting an Excel File is Locked
Question details
The user needs to resolve an issue where Power Automate incorrectly reports that an Excel or SharePoint file is locked, preventing workflows from executing successfully.

- Product
- Power Automate, Microsoft Excel
- Device & OS
- not provided
- Scenario
- Running automated workflows in Power Automate that create, read, or modify an Excel file stored in SharePoint or OneDrive.
- Observed behavior
- Power Automate throws an error stating the Excel file is locked and cannot be accessed, even when the file appears to be closed and unused.
Ensure that you have administrative or edit permissions for the Excel file in SharePoint or OneDrive, and temporarily pause any other active flows targeting the same file to prevent conflicts.
Release Active Office Sessions and Clear Locks
Use this solution to ensure that no hidden background processes or concurrent sessions are holding a lock on your Excel file.
Even when a file appears closed, an Office session or background SharePoint synchronization might still hold a lock on it. Manually closing the file across all platforms and forcing a session timeout often resolves the issue.
Verify that the Excel file is fully closed in both Excel for the web (browser tabs) and the desktop Excel application.
Sign your Microsoft account out of any other devices or virtual environments that might be silently accessing the SharePoint repository.
Wait 10 to 15 minutes before retrying the flow. SharePoint automatically releases inactive background locks after a short delay.

Add a Delay Action to Your Flow
Adding a built-in delay prevents the flow from trying to modify a file before SharePoint finishes processing its creation.
Test with a Copied File
Creating a clean copy of the file helps rule out stubborn server-side locks attached to the original file's metadata.
Try WPS Office for Seamless Spreadsheet Management
While troubleshooting complex cloud automation issues like Power Automate file locks, consider using WPS Office for your standard, local spreadsheet tasks. WPS Office provides a robust, lightweight, and completely free alternative that prevents heavy background sync issues.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the software: Run the installer and follow the on-screen prompts to set up WPS Office on your device.
- 3. Open your spreadsheets: Launch WPS Spreadsheets and open your existing .xlsx files directly without any formatting loss.

Frequently Asked Questions
Why does Power Automate say my Excel file is locked when it's closed?
Even if the file is closed on your screen, SharePoint may still be processing it, a hidden background Office session might be holding a temporary lock, or another automated flow may be actively querying the file.
How long does a SharePoint file lock usually last?
A file lock on SharePoint typically releases automatically after 10 to 15 minutes of inactivity once the active session or process is terminated.
Does manually deleting the locked file fix the Power Automate flow?
No, deleting the file manually will cause the flow to fail with a 'file cannot be found' error rather than resolving the lock issue. It is better to use a copied version of the file or wait for the lock to timeout.
Can parallel flows cause an Excel file lock error?
Yes. If multiple flows or different concurrent branches within the same flow attempt to access, read, or modify the same Excel file simultaneously, a lock error will be triggered to prevent data corruption.




