The fastest way to lock an Excel file

Open the file you want to protect in Excel. Go to File > Info > Protect Workbook > Encrypt with Password. Type a password at least 8 characters long — use a mix of uppercase, lowercase, numbers, and symbols. Excel will ask you to type it again to confirm. Save the file. The next time anyone opens it, they will see a password prompt before the spreadsheet appears.

This method encrypts the entire file, meaning someone cannot open it at all without the correct password. It is the strongest protection Excel offers built-in, and it works the same way on Windows and Mac.

Key Takeaways

  • Excel's Encrypt with Password feature locks the entire file so it cannot be opened without the correct password.
  • A strong password should be at least 8 characters and include uppercase, lowercase, numbers, and symbols.
  • If you forget the password, Excel cannot recover it — there is no "forgot password" option for encrypted files.
  • Password-protecting a file is different from restricting edits; you can do both on the same file if you need different levels of control.
  • Excel stores the password as an encrypted hash, so even Microsoft cannot see what you typed.

Why a strong password matters for spreadsheets

A weak password — something like "password123" or your name — can be guessed or cracked by someone with basic tools. If your spreadsheet holds financial data, client lists, salary information, or anything else you would not want public, a weak password gives a false sense of security. Someone determined enough can break in, and you will not know it happened.

A strong password is harder to guess and takes longer to crack. The longer the password and the more different character types it includes, the harder it becomes. A 12-character password with mixed case, numbers, and symbols is substantially stronger than an 8-character one, though 8 is the practical minimum.

Write your password somewhere find — a password manager like Bitwarden, 1Password, or KeePass, not a sticky note on your monitor. If you lose the password, you lose access to the file permanently. Excel does not have a recovery option.

Protecting specific sheets instead of the whole file

If you want to let people open the file but prevent them from editing certain sheets, use Sheet Protection instead. Go to Review > Protect Sheet, set a password, and choose which actions people can perform — for example, they can view and sort but not delete rows. This is weaker than file encryption because someone can still open the file and see the data; they just cannot change it.

You can use both methods on the same file. Encrypt the whole file with one password so people cannot open it at all, and then protect individual sheets with a different password so that even if someone has the file password, they cannot edit sensitive columns. This is useful when you want to share a file with colleagues but keep certain calculations or formulas locked.

What happens when someone tries to open a password-protected file

When a password-protected Excel file is opened, a dialog box appears before the spreadsheet loads. The person opening it must type the correct password. If they type it wrong, they see an error message and can try again. After several wrong attempts, some systems may lock them out temporarily, but Excel itself does not have a built-in lockout — they can keep guessing.

This is why password strength matters. A straightforward password can be guessed in seconds by someone with a computer. A strong, random password is far more resistant to guessing and to automated cracking tools.

Removing or changing a password later

To change the password on an already-protected file, open it with the current password. Go to File > Info > Protect Workbook > Encrypt with Password. The password field will be empty. Type the new password and confirm it. Save the file.

To remove the password entirely, follow the same steps but leave the password field blank when prompted. Save the file. It will no longer require a password to open. Anyone with access to the file can then open it freely.

Password protection versus cloud storage security

If you store your Excel file in OneDrive, Google Drive, or Dropbox, those services encrypt the file in transit and at rest — meaning it is scrambled while traveling to their servers and while sitting there. But the service itself can still access the file if a hacker breaks into your account or if the company is subpoenaed. Password-protecting the Excel file adds a second layer: even if someone gains access to your cloud account, they still cannot open the spreadsheet without the password.

For sensitive data, use both: store the file in a cloud service with strong account security (a long password and two-factor authentication), and also password-protect the Excel file itself. This way, if your cloud account is compromised, the spreadsheet remains locked.

Common mistakes to avoid

Do not use a password you have used elsewhere. If that password is leaked from another service, someone could use it to open your Excel file. Do not store the password in the file name or in a comment inside the spreadsheet. Do not email the password in the same message as the file — send them separately, or use a password manager that both people can access.

Do not assume that password protection makes the file invisible to antivirus software or backup systems. Your computer's backup tool, your cloud sync service, and security software can all still see and copy the encrypted file. Password protection only prevents someone from reading the contents without the password.

Frequently Asked Questions

Can I password protect just one sheet in a workbook?

Yes. Use Review > Protect Sheet to lock individual sheets while leaving others editable. This prevents changes to that sheet but does not prevent opening the file. If you want to prevent opening the file entirely, you must encrypt the whole workbook.

What if I forget the password?

Excel cannot recover it. There is no password reset, no recovery email, and no backdoor. If you forget the password, the file is locked permanently. This is why storing passwords in a password manager is essential.

Does password protecting an Excel file slow it down?

No. The encryption happens once when you save the file. Opening and editing it afterward is not noticeably slower, even on older computers.

Can someone crack an Excel password?

A weak password can be cracked in seconds with the right tools. A strong password — 12+ characters with mixed case, numbers, and symbols — is far more resistant. For highly sensitive data, password protection alone may not be enough; consider also restricting who has access to the file.

Is Excel password protection the same on Windows and Mac?

Yes. The steps are identical, and a file encrypted on Windows can be opened on Mac and vice versa, as long as the person has the correct password.