How to Require a Password to Open an Excel File

In the Windows desktop version of Excel, open the workbook and choose File > Info > Protect Workbook > Encrypt with Password. Save the workbook, close it and reopen that exact file to confirm Excel asks for the password before showing its contents.

Choose a password you can recover yourself

Microsoft cannot retrieve a forgotten file password. Before setting it on your only copy, store the password in a password manager or another secure place you control. If the workbook matters, keep a backup in a protected location. An older unencrypted backup or a copy you emailed earlier does not gain protection when you change this file.

Set the password that opens the workbook

  1. Open the workbook in Excel for Windows. Check its name and location so you protect the intended copy. If you are working in a browser and the commands below are absent, open the file in the desktop app.
  2. Select File > Info, open Protect Workbook, then choose Encrypt with Password. The command you need is in the File menu, even though Excel also uses the words “Protect Workbook” on its Review tab.
  3. Enter your chosen password, select OK and repeat it in the confirmation box. Passwords are case-sensitive. Save the workbook before closing it.
  4. Reopen the same saved file. Confirm Excel asks for a password before the first worksheet appears. Enter the password from your secure record and make sure the workbook opens. If it opens without a prompt, check that you saved the change and are opening the protected copy.

Microsoft’s Excel file-protection instructions describe this password prompt and the limits of recovery.

If the workbook opens but editing is restricted

Worksheet protection controls changes to cells. Workbook structure protection limits changes such as moving or deleting worksheets. Neither setting by itself keeps someone from opening the file to read it. A “password to modify” can also permit read-only access. If your goal is confidentiality, confirm that Excel asks for a password before displaying the workbook.

Change or remove a known opening password

  1. Open the file using its current password. Return to File > Info > Protect Workbook > Encrypt with Password.
  2. To change the password, replace it and confirm the new one. To remove it, clear the password field and select OK. Save the workbook.
  3. Close and reopen the file. After a change, verify that the new password works. After removal, confirm the file opens directly before sharing it. Anyone holding an earlier encrypted copy still needs the password used on that copy.

A file-opening password travels with the protected workbook. If your goal is to protect several files on one Windows PC, Windows folder encryption is a separate option that depends on a Windows account and its private key.