sodcalculator

10 Tech How-To

Protect Excel Workbook from Opening and Editing

Guide 10-35233 · Updated · Step by step

This guide shows you how to lock down an Excel workbook so that others cannot open it without a password, and cannot edit its structure or contents even if they do open it. You’ll need a Windows or Mac version of Excel (2016 or later, or Microsoft 365) and the file saved in the modern .xlsx format for full protection features.

What You’ll Need

  • Microsoft Excel (desktop version recommended; web version has limited protection options)
  • The workbook file you want to protect
  • A strong password (mix of letters, numbers, symbols)

Step-by-Step

  1. Open the workbook in Excel. Make sure you have the final version you want to protect—any changes after protection will require re-applying.
  2. Go to File > Info. In the left sidebar, click Info if it isn’t already selected.
  3. Click “Protect Workbook.” A dropdown menu appears with several options.
  4. Choose “Encrypt with Password” to prevent opening. This is the primary method to stop unauthorized opening. Enter a password, click OK, then re-enter it to confirm. The file will now require this password to open.
  5. To prevent editing (structure), select “Protect Workbook Structure.” This locks the sheet tabs so users cannot add, delete, move, rename, or hide sheets. You can set a password (optional) or leave it blank to allow anyone to unprotect—but a password is recommended.
  6. To prevent editing cell contents, protect individual sheets. Right-click on a sheet tab, choose Protect Sheet, and set a password. You can choose what users can do (e.g., select cells, format, insert rows). To protect all sheets, repeat for each tab.
  7. Save the file. Press Ctrl+S (or Cmd+S on Mac) to apply all protections. The file is now protected.

Common Mistakes

  • Forgetting the password. Excel does not offer a way to recover a lost password. If you forget it, the file may be permanently inaccessible.
  • Only protecting the structure, not the sheets. Users can still edit cell values if sheets are not protected.
  • Using a weak password. Simple passwords can be cracked with brute-force tools. Use a long, random password.
  • Protecting after making changes. If you edit the workbook after applying protection, the protection may be removed or you may need to reapply it.
  • Sharing the password unintentionally. If you send the password in the same email as the file, protection is useless.

Tips

  • Use a passphrase. A sentence with spaces and numbers (e.g., “MyDogRex3!Barks”) is strong and memorable.
  • Keep a backup copy. Store an unprotected version in a secure location (like a password manager) in case you need to recover the file.
  • Protect all sheets at once. You can select multiple sheet tabs (hold Ctrl and click) then right-click and choose Protect Sheet to apply the same settings.
  • Use “Mark as Final” for read-only. This is not a security feature, but it discourages editing by showing a banner. It can be easily removed.
  • Restrict editing with “Always Open Read-Only.” In the Protect Workbook menu, you can choose this option to prompt users to open as read-only, but they can still choose to edit.

Troubleshooting

I forgot the password to open the file. Unfortunately, Excel does not provide a recovery method. Try to remember any variations, or check if you saved it in a password manager. If not, you may lose access.

The “Protect Workbook” option is grayed out. This happens if the file is in compatibility mode (.xls). Convert it to .xlsx by going to File > Save As and choosing “Excel Workbook (*.xlsx).”

Users can still edit cells even after I protected the sheet. Check that you actually selected “Protect Sheet” (not just “Protect Workbook Structure”). Also, ensure you didn’t check the “Edit objects” or “Edit scenarios” boxes in the protection dialog, which can allow changes.

The password prompt appears twice when opening. This is normal if you have both an open password and a modify password. You can set a modify password separately in Save As > Tools > General Options, but the encrypt password is the main one.

I can’t unprotect a sheet because I forgot the sheet password. There is no built-in way to recover it. However, you can copy the entire sheet to a new workbook (right-click tab > Move or Copy) which will remove the protection, but this only works if you can open the file without a password.

Frequently Asked Questions

Q: Can I protect a workbook from being opened without a password?
A: Yes, use File > Info > Protect Workbook > Encrypt with Password. This requires a password to open the file.

Q: What is the difference between protecting a workbook and protecting a sheet?
A: Protecting a workbook locks the structure (sheets cannot be added, deleted, moved, etc.). Protecting a sheet locks cell contents and formatting within that sheet.

Q: Can I allow users to view but not edit without a password?
A: Yes, you can protect the sheet without a password, but users can unprotect it easily. For a more secure read-only, you can encrypt with a password and share the password only with those who need to edit.

Q: Will protection work if I save as .xls?
A: Basic password protection works, but sheet protection features may be limited. It’s best to use .xlsx.

Q: Can I remove protection later?
A: Yes, go to File > Info > Protect Workbook > Encrypt with Password and delete the password, or go to Review > Unprotect Sheet (or Workbook) and enter the password.

Q: Does Excel online support these protections?
A: Excel for the web can open password-protected files but cannot create them. You need the desktop app to apply protection.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →