You need to share an Excel file but want to control who can open it and who can edit it. Excel provides two separate password layers for this purpose. This article explains how to set a password to open a file and a different password to modify it.
You can apply these protections when saving a workbook. The process uses the standard Save As dialog box. We will cover the steps for both the current and older file formats.
Key Takeaways: Setting Open and Modify Passwords
- File > Save As > Tools > General Options: This dialog box is where you set the password to open and the password to modify the Excel file.
- .xlsx vs .xls format: The password to open feature uses stronger encryption in the modern .xlsx format compared to the older .xls format.
- Read-Only Recommended: You can suggest users open the file as read-only without requiring a password to modify it.
Understanding Excel’s Two Password Types
Excel’s file-level protection operates on two distinct levels. The first is a password to open the file. When set, this password encrypts the entire workbook contents. No one can view the data without entering the correct password.
The second level is a password to modify the file. This protection does not encrypt the file. It only restricts the ability to save changes back to the original file. A user without the modify password can still open the workbook and edit data. However, they must save their changes to a different file name.
Prerequisites and File Format Notes
You can apply these passwords to any Excel workbook. The strength of the encryption for the “password to open” depends on your file format. Saving as a modern .xlsx file uses AES 256-bit encryption. Saving in the legacy .xls format for Excel 97-2003 uses a much weaker encryption method.
Remember these passwords yourself. Microsoft cannot recover a lost “password to open.” If you forget the “password to modify,” you can still open the file but cannot save edits to the original.
Steps to Set Passwords on Save
The primary method for adding passwords is through the Save As dialog. Follow these steps to protect a new or existing file.
- Initiate the Save As dialog
Open your workbook in Excel. Click File > Save As. Choose the location on your computer or OneDrive where you want to save the protected file. - Open the General Options dialog
In the Save As dialog box, look for the Tools button next to the Save button. Click Tools and select General Options from the dropdown menu. - Set your passwords
In the General Options dialog, you will see two text fields. Enter your desired password in the ‘Password to open’ field. Enter a different password in the ‘Password to modify’ field. You can fill in one, the other, or both. - Confirm the passwords
Click OK. Excel will prompt you to re-enter the password to open for confirmation. After clicking OK, it will prompt you to re-enter the password to modify. Re-enter each password exactly as you typed it before. - Complete the save
Click Save in the Save As dialog. If you are saving over an existing file, confirm you want to replace it. The new copy is now password-protected.
Using the Read-Only Recommended Feature
If you want to suggest users open the file as read-only without forcing a password, use a different setting. This is useful for distributing templates or reference files.
- Access General Options
Follow steps 1 and 2 above to reach File > Save As > Tools > General Options. - Check the recommendation box
In the General Options dialog, check the box labeled ‘Read-only recommended’. Do not enter a password in the ‘Password to modify’ field. Click OK and complete the save. - Understand the user experience
When someone opens this file, Excel displays a message suggesting they open it as read-only. The user can choose to accept this or click No to open with full edit permissions. This is a suggestion, not a restriction.
Common Mistakes and Limitations to Avoid
“Password to Modify” Does Not Prevent Copying
The password to modify only guards the original file from being overwritten. A user can open the file, select all cells, copy the data, and paste it into a new, unprotected workbook. This protection is not a substitute for worksheet protection that locks cells.
Using the Same Password for Open and Modify
Avoid using the same password for both fields. This defeats the purpose of having two separate permission levels. If you give the “open” password to someone, they will also be able to modify the file if the passwords are identical.
Forgetting to Save in the Correct Format
If you need strong encryption, always save your file in the .xlsx format. If you accidentally save as .xls, the password to open can be broken easily with basic software. Double-check the ‘Save as type’ dropdown in the Save As dialog before clicking Save.
Password to Open vs Password to Modify: Key Differences
| Item | Password to Open | Password to Modify |
|---|---|---|
| Purpose | Encrypts file and prevents viewing | Prevents saving changes to the original file |
| Encryption Used | Strong AES 256-bit for .xlsx files | No file encryption |
| User Without Password | Cannot open the file at all | Can open in read-only mode; must use Save As |
| Recovery by Microsoft | Not possible if password is lost | Not applicable; file can still be opened |
| Best For | Confidential data requiring secrecy | Distributing templates or forms |
You can now secure your Excel files with separate passwords for access and editing. Use the General Options dialog in the Save As process to set these protections. For stronger security, combine file passwords with worksheet protection that locks specific cells. Remember to test your protected file by closing it and attempting to open it with and without the correct passwords.