You can lock a file to make it read-only and prevent it from being accidentally deleted or modified.
Lock or unlock a workbook to make it read-only
Note: If your workbook is shared, anyone who has Write privileges can clear the read-only status. For stronger protection, require a password to save changes.
-
Select File > Always Open Read-Only.
-
To remove read-only status, repeat the step to remove the check mark next to Aways Open Read-Only.
-
-
To require a password, select File > Passwords ... and enter a Password to open the file. To allow separate access to change the document, enter a Password to modify.
Important: Microsoft cannot retrieve forgotten passwords, so be sure that your password is especially memorable.
See also
Prompt to open a workbook as read-only in Mac
Restrict changes to files in Excel
Video: Restrict changes to files