When you have an Excel file and don’t want everyone to open or edit it but only specific people then you could protect the file with a password. To do this, you have to use the ‘Save As...’ option and select ‘Browser’:
In the typical window to save the file, go to ‘Tools’ option and then select ‘General Options...’:
With that selection, you will be able to set a password that will be asked when opening or editing the file, without the right password the file will not open or edit:
This is the popup that will appear to anyone after setting the protection:
Also, you can use this option to set a recommendation when opening the file to use it as read-only, to do this just check the box ‘Recommend as read-only’ located under the password box, then when opening the file will always show this:
This read-only function can be used without setting a password.