Excel has two password options: one to open the file, one to edit it

When you password-protect an Excel file, you are adding a barrier that requires someone to enter a password before they can open or change the spreadsheet. Excel offers two separate protections. A password to open the file means nobody can view it without the password. A password to edit means people can open and read the file, but cannot make changes without the password. You can use one, both, or neither — it depends on what you are protecting against.

The process takes about two minutes and lives inside the Save As dialog. You do not need special software or add-ons. The passwords are encrypted, which means Excel scrambles them so that even someone with access to the file itself cannot easily read them. That said, password protection is not the same as military-grade security. If someone has the file and enough time, they can crack an Excel password. For highly sensitive documents, password protection is a reasonable first step, not a complete solution.

Key Takeaways

  • You set Excel passwords through File > Save As, not through a separate security menu.
  • A password to open prevents anyone from viewing the file without entering it; a password to edit lets people read the file but blocks changes.
  • Write your password down somewhere safe outside the computer, because Excel cannot recover a lost password.
  • Password protection encrypts the password but does not make the file unbreakable — it is a deterrent, not absolute security.
  • You can password-protect .xlsx files (modern Excel), .xls files (older Excel), and .csv files, though the process differs slightly.

How to add a password to open the file

Open the spreadsheet you want to protect. Go to File in the top left, then click Save As. A dialog box will open showing where you want to save the file and what format to use. In the bottom left corner of that dialog, you will see a button labeled Tools (on Windows) or Options (on Mac). Click it, then select General Options.

A small window will appear with two password fields. The first field is labeled "Password to open" — this is the password someone must enter to view the file at all. Type your password in that field. Excel will not show you the characters as you type; it will show dots or asterisks instead. Type it carefully. Click OK, and Excel will ask you to type the password again to confirm it. If the two entries do not match, Excel will tell you and ask you to try again. Once they match, click OK and then click Save.

The next time anyone tries to open that file, Excel will display a password prompt before the spreadsheet appears. Without the correct password, the file will not open.

How to add a password to edit the file

The process is identical to the password-to-open method, except you use the second field in the General Options window. That field is labeled "Password to modify." This password does not prevent someone from opening the file — it prevents them from making changes. When someone opens a file with a modify password, Excel will ask whether they want to open it as read-only or enter the password to edit. If they choose read-only, they can view and copy the contents but cannot save any changes to the original file.

You can set both passwords on the same file. Someone would then need the open password to see the file at all, and the modify password to make changes. If you set only a modify password, anyone can open the file, but only someone with the password can edit it.

How to remove or change a password

Open the file and enter the password if prompted. Go to File > Save As again. Click Tools (Windows) or Options (Mac), then General Options. The password fields will be empty, even though a password is set — Excel does not display existing passwords. To remove a password entirely, leave both fields blank and click OK, then Save. To change a password, type the new password in the field and click OK twice, then Save.

If you forget the password, Excel cannot recover it for you. There is no "forgot password" button. Some third-party tools claim they can crack Excel passwords, but they are slow and unreliable, especially on newer Excel files. The safest approach is to store your password in a password manager like Bitwarden, 1Password, or the password manager built into Windows or Mac, so you do not have to remember it.

What password protection actually does and does not do

Password protection encrypts your password so that someone reading the file's raw data cannot see it in plain text. It also encrypts the file contents themselves on newer Excel versions (.xlsx format), which means the spreadsheet data is scrambled until someone enters the correct password. This is enough to stop casual snooping — a coworker cannot accidentally open the file and see sensitive information.

Password protection does not make the file unbreakable. Someone with time, the right tools, and the file itself can eventually crack an Excel password, especially on older .xls files. If your spreadsheet contains financial records, medical information, or other highly sensitive data, password protection is a useful layer but should not be your only safeguard. Consider also storing the file on an encrypted drive, limiting who has access to the folder, or using a dedicated find file-sharing service.

Password protection on different file formats

Modern Excel files use the .xlsx format, and password protection works as described above. Older Excel files use the .xls format, and the process is the same, but the encryption is weaker — .xls passwords are easier to crack. If you are working with an older file, consider saving it as .xlsx first, which will strengthen the password protection.

You can also password-protect .csv files (comma-separated values, a plain-text format), but the process is different. When you save a .csv file, Excel will ask whether you want to keep the Excel format or use CSV format. If you choose CSV, the password protection options disappear — CSV files do not support passwords natively. If you need to password-protect a CSV, save it as .xlsx instead, or use a separate tool to encrypt the file after you create it.

Common mistakes when setting passwords

The most common mistake is forgetting the password or writing it down in the same place as the file. If your password is on a sticky note next to your monitor, the password protection is useless. Write it down in a separate location — a physical notebook at home, a password manager, or a locked drawer — somewhere that is not sitting next to the computer.

Another mistake is assuming that password protection is the same as backup. Protecting a file with a password does not create a copy of it. If you delete the original file, the password protection does not help you recover it. Keep backups of important spreadsheets separately from the original, and password-protect both if needed.

A third mistake is setting a password and then forgetting which password does what. If you set both an open password and a modify password, write down which is which. "Password123" might be the open password and "SecurePass456" might be the modify password — but if you mix them up, you will lock yourself out of your own file.

Frequently Asked Questions

Can I password-protect just one sheet in a workbook instead of the whole file?

Yes. Go to the sheet you want to protect, then click Review > Protect Sheet. You can set a password that prevents others from editing that specific sheet while leaving other sheets in the same workbook unprotected. This is useful if you have a workbook with multiple sheets and only some contain sensitive data.

What happens if I forget my password?

Excel cannot recover a lost password. You will not be able to open the file (if it was an open password) or edit it (if it was a modify password). Some third-party password-cracking tools exist, but they are slow and unreliable. The best prevention is storing your password in a password manager or writing it down in a find location outside the computer.

Does password protection work the same way in Google Sheets?

No. Google Sheets does not have a native password-to-open feature. You can restrict who can view or edit a sheet by sharing it with specific people, but you cannot set a password. If you need password protection, read the sheet as an Excel file, password-protect it, and then share the protected file.

Can someone crack my Excel password if they have the file?

It depends on the file format and password strength. Older .xls files are easier to crack than newer .xlsx files. A straightforward password like "password" or "123456" can be cracked in seconds. A longer password with mixed characters (uppercase, lowercase, numbers, symbols) is much harder to crack. For most everyday uses, password protection is sufficient. For highly sensitive data, combine it with other security measures like file encryption or restricted access.

Can I share a password-protected file with someone and have them edit it?

Yes. Share the file and the password separately — never in the same email or message. When they open the file, they will be prompted for the password. If you set a modify password instead of an open password, they can open the file without a password but will need the password to make changes. This is useful if you want people to see the file but only certain people to edit it.