You are trying to open an Excel file and you get: “File in Use: File is locked for editing by another user.” Sometimes the file is locked by another user, and other times the "another user" is actually you. If you have locked the file yourself, it might be because the file is open on a different device, or the previous instance of the file didn't close properly.
Make sure the file is closed on all your devices. If the error still occurs, wait a few minutes for the server to release the lock on the file. (Sometimes the server thinks you have the file open, and just needs to catch up with what’s really going on.)
If the other user is not you, you can wait until the other person is done and has closed the file. You can also choose to view it as read-only. Or, you can ask the person to close the file, check it in, or give you edit permissions.
If you want to work on the file at the same time as other people, then make sure everyone uses a version of Excel that supports co-authoring. When you co-author, more than one person can open the file, and you can see each other's changes quickly — in a matter of seconds. At this time, Excel for Android, Excel for iOS, Excel Mobile, and Excel Online support co-authoring. In addition, if you have an Office 365 subscription, then you can co-author with Excel 2016 for Windows as well. If people aren’t sure which version of the app they have, then encourage everyone to use Excel Online to co-author in a web browser.
If you want to avoid the error by co-authoring with others, put the file on OneDrive, OneDrive for Business, or SharePoint. If the file is saved to another location that doesn’t support co-authoring, people will get the “locked” error. Server paths like \\server\folder, local and mapped paths like C:\ or N:\, and other cloud locations like DropBox, Box, and Google Drive do not support co-authoring. Please also note that co-authoring is not supported in Excel 2016 when the workbook is on a SharePoint On-Premises site. If you have an on-premises site and Excel 2016, try using Excel Online to co-author instead.
If you are trying to co-author, check the file name of the file and make sure it is in either .xlsx, .xlsm, or .xlsb format. If the file is in another format, go to File > Save As > Browse > Save as type and choose the .xlsx, .xlsm, or .xlsb format.
If you are trying to co-author, the “locked” error can occur if you use a feature that is not supported by co-authoring. Ask the person who has the file open to do one or more of the following:
If possible, remove password encryption from the file: Go to File > Info > Protect Workbook. Then delete the password and click OK.
If possible, remove restricted access: Go to File > Info > Protect Workbook > Restrict Access and click Unrestricted Access.