

- #OFFICE 365 EXCEL FILE LOCKED FOR EDITING BY ME CODE#
- #OFFICE 365 EXCEL FILE LOCKED FOR EDITING BY ME PC#

You may want to read this blog post on SharePoint lock types. Using this application, you can unlock long-term and short-term locks quickly and easily. And to my knowledge, there is no way to unlock a short-term lock through the API (probably by design). However, if the client application crashes or a couple other scenarios play out, people end up waiting hours or even days for their document to be unlocked. If the client program doesn't renew the lock, SharePoint is supposed to release it. The client application might renew the checkout's expiration time for example, Office programs renew locks in 10 minute intervals. If, for reasons explained in the Background section, the short-term lock isn't released, you either have to reboot the server or wait until the lock's expiration. A short-term lock is placed on the document when it's not checked out but the client application is locking it.

But it only works for long-term locks (check outs).
#OFFICE 365 EXCEL FILE LOCKED FOR EDITING BY ME CODE#
Some have already written code in a console application to force a check-in of the document. SharePoint calls this the CheckOutStatus which, for this article, I will call a lock since that is effectively what the status is describing.
#OFFICE 365 EXCEL FILE LOCKED FOR EDITING BY ME PC#
Sometimes the user's PC crashes, or they lose their internet connection, or solar flares hit the server room, and the lock cannot be released no matter how hard an admin tries. SharePoint places locks on files in document libraries when you check them out or open them.
