Hi,
This error may be caused by the user did not delete the temporary file when closing the file, the user not having the permission to delete the file. It is recommended that you check whether there are any temporary files with a hidden prefix of ~$ in the folder where the file is located, and you can delete it manually.
This problem mainly requires users to have enough read, write and delete permissions, and it is recommended to check the permissions of users.
About how to know who has locked the file, first you need to set the username in Excel, you can go to File - Options - General - to find the User Name option, make sure that all users have the name written on it.
At the same time, you can also set Clear Office Document Cache- go to File- Options- Save- Under Cache Settings, tick the option "Delete files from the Office Document Cache when they are closed" and click Delete cached files.
Just checking in to see if the information was helpful. Please let us know if you would like further assistance.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.