I can’t explain why this worked, I know it’s completely illogical, but it worked.
It seems every other day or so, a message pops up when trying to open it that says, 'The file is locked. At the bottom of this post, I’ve listed more ideas I tried that might work for you. This very basic excel file (no macros, no formulas) is saved on a network drive and is Shared. Now that you’ve confirmed the individual who had the file locked can’t really have it open or locked, you can try the solution that worked for me. You can try waiting a day to see if the lock lifts overnight or after a few hours.Have that user restart their machine used to edit the file in the first place for good measure.Make sure the user who has it locked has closed all office apps (Task Manager is a good way to see if anything is running in the background).If it really was checked out, check it in with their account. In control panel, delete stored credentials for Office 365. Determine which user account is reporting as having the file locked. Click on Check out, then immediately go back and click on Check in. Ask them to launch Excel and click on File > Info > Manage Workbook. If the user still has it open, have them save and close out. Determine which user account is reporting as having the file locked.
The first few things you should try (stop if one of the steps fixes the issue): This locked others from editing the file. The user in question, who had it “locked for use,” had the file open in Excel (client, not online) when their computer unexpectedly shut down. This might indicate a user whose computer is not up-to-date with patches.I recently ran into the following error when someone tried to edit a shared Excel file from OneDrive (we’re running SharePoint Server 2016). The name displayed in is from the “Personalize your copy of Microsoft Office” (File/Options/General).ThereĪre Office patches which claim to resolve this issue at the workstation level, but deleting the temporary file is the most efficient workaround. I have applied Excel > Review > Allow Edit Ranges > New > RangeName > Cells > Permissions. Evidently there are circumstances under which the temporary file is left behind, resulting in an erroneous “File locked for editing by ”.
The temporary file should disappear when the document gets closed.It is a hidden file as well as a “protected operating system" file, so it will not normally be displayed in the folder contents unless the View tab in Folder Options has been modified. The name of the temporary file is the same as the document with a tilde ( ~ ) inįront of it. Excel (and probably any MS Office application) creates a temporary file in the same folder as the document when someone opens it on the network.Save this macro to your spreadsheet and it will tell you when someone else has the file open. It's just a temporary file that needs to be deleted. Use VBA to find out who has your Excel file locked for editing. In my case, it wasn't nearly as complicated as some related threads might indicate.
SHARED EXCEL FILE LOCKED FOR EDITING WINDOWS
I've been having this issue on one of my Windows networks and finally took the time to figure it out.