I saw this in Word live collaboration only last week but it also occurs in Excel. It appears to happen when saving the file and the users Upload Center is having authentication issues.
Solutions
Resolution method 1
- Get all users who collaborate on the file to close it, both in Excel and Excel Online.
- On each machine they use, launch the Upload Center and check that none of them are showing pending or failed uploads, specifically for that file.
- Attempt to resolve the issue in the Upload Center or discard the file in the queue.
- Do not attempt to reopen the file Excel and Excel Online for 30 minutes. This should allow SharePoint to release the lock.
- Test again.
Resolution method 2
- Determine which user account is reporting as having the file locked.
- Ask them to launch Excel and open the file then close it.
- Test again.
Resolution method 3
- Determine which user account is reporting as having the file locked.
- Ask them to launch Excel and click on File > Info > Manage Workbook.
- Click on “Check out”, then immediately go back and click on “Check in”.
- Test again.
Resolution method 4
- Determine which user account is reporting as having the file locked.
- In control panel, delete stored credentials for Office 365.
- Log back in to the Office Apps.
- Test again.
You should see who is locking the file if other users keep trying to open/save it in Excel. Sometimes you just see the read only message but that can vary from user to user.
References
https://techcommunity.microsoft.com/t5/SharePoint/Cannot-Release-Lock-on-SharePoint-Online-File/td-p/59694
https://microsoftteams.uservoice.com/forums/555103-public/suggestions/32121466-file-locking-bug-in-sharepoint-frequently-get-fi
https://techcommunity.microsoft.com/t5/SharePoint/quot-Error-The-file-is-locked-quot-when-using-Office-Online/td-p/227866
https://support.office.com/en-us/article/unlock-a-file-that-has-been-locked-for-editing-bdda0d41-1b8e-44ed-a6ae-6d095d37c22d
https://community.spiceworks.com/topic/2144925-sharepoint-file-locked-for-edit