You need to secure sensitive data in your Excel workbook from unauthorized access. Excel provides built-in encryption to lock files with a password. This article explains how to add a password for opening a file and how to remove that protection later.
Key Takeaways: Protecting and Unprotecting Excel Files
- File > Info > Protect Workbook > Encrypt with Password: Sets a password that must be entered to open the Excel file.
- File > Save As > Tools > General Options: An alternative method to set both an open password and a modify password.
- File > Info > Protect Workbook > Encrypt with Password (clear field): To remove a password, open the file, access this menu, and delete the existing password.
Understanding Excel File Encryption
Excel uses strong encryption to secure workbook files. When you set a password to open a file, Excel encrypts the entire contents. The file cannot be read without the correct key derived from your password. This is different from worksheet or workbook structure protection, which only prevents editing of cells or sheets.
You must have the file open and the password available to remove the protection. Excel does not offer a “forgot password” recovery option. Always store your password in a secure location. The encryption feature is available in all modern versions of Excel for Windows and Mac.
Steps to Add a Password to an Excel File
Use the Info panel in Backstage view for the most direct method. Ensure you have saved your workbook at least once before starting.
- Open the Protect Workbook menu
With your workbook open, click the File tab. Select Info from the left-hand menu. Click the Protect Workbook button. Choose Encrypt with Password from the dropdown list. - Set the encryption password
A small dialog box titled Encrypt Document appears. Type your desired password into the Password field. Click OK. A second Confirm Password dialog appears. Re-enter the exact same password and click OK again. - Save the protected file
The Info panel now shows a message stating a password is required to open this workbook. You must save the file for the protection to take effect. Click Save or press Ctrl+S. The next time you or anyone else opens this file, Excel will prompt for the password.
Using the Save As Dialog for Advanced Options
The Save As method offers two separate password fields. The first requires a password to open the file. The second can set a password to modify the file, allowing read-only access without it.
- Initiate Save As
Click File > Save As. Choose your desired save location, like This PC or a network drive. - Access the General Options
In the Save As dialog, click the Tools button next to the Save button. Select General Options from the dropdown menu. - Enter password settings
In the General Options dialog, type a password in the Password to open field. To set a modify password, type a different password in the Password to modify field. Click OK, confirm the passwords as prompted, and then click Save.
Common Mistakes and Limitations to Avoid
Forgetting the Password to Open the File
Microsoft does not store or recover lost passwords for encrypted Excel files. If you forget the password, you cannot open the file. Use a trusted password manager to store critical passwords. Do not use overly complex passwords you cannot remember.
Confusing File Encryption with Worksheet Protection
The Review > Protect Sheet or Protect Workbook commands only stop users from editing cells or changing the structure. They do not prevent someone from opening the file to view its data. For true confidentiality, you must use the File > Info > Encrypt with Password feature.
Password Protection Not Working on Shared Drives
If a file on a network or cloud drive like OneDrive does not prompt for a password, the encryption may have been removed. Always verify protection is active by checking the File > Info panel. Some cloud sync services may require re-uploading the file after the password is applied locally.
Password to Open vs. Password to Modify
| Item | Password to Open | Password to Modify |
|---|---|---|
| Primary Purpose | Prevents unauthorized viewing of file contents | Prevents saving changes to the original file |
| Encryption Used | Strong AES encryption | No file encryption |
| User Experience | Password prompt appears before file opens | User can open file as read-only without password |
| Removal Method | File > Info > Encrypt with Password (clear field) | File > Save As > Tools > General Options (clear field) |
| Data Security Level | High – file is unreadable without password | Low – data is visible, only editing is restricted |
You can now secure your Excel files with encryption to protect confidential data. Remember to use the Info panel to verify protection is active. For shared files where viewing is okay but editing is not, consider using the Password to Modify option from the Save As dialog. A pro tip is to use the F12 key as a shortcut to open the Save As dialog quickly for applying or removing modify passwords.