To require a password before anyone can open an Excel workbook in Microsoft 365 for Windows, open the file and select File > Info > Protect Workbook > Encrypt with Password. Enter and confirm a strong password, then save the workbook. This encrypts the file; it is different from protecting a worksheet or workbook structure, which does not prevent someone from opening the file.
What a password to open actually protects
Excel uses the phrase “Encrypt with Password” for the setting that puts a password requirement on opening a workbook. A person who receives the protected file must enter the password before Excel displays its contents. This is useful when a workbook contains private information and might be copied, emailed, or stored somewhere other people can access.
Several other Excel protections sound similar but serve different purposes:
- Encrypt with Password: Requires a password to open the workbook and protects the file’s contents.
- Protect Sheet: Restricts certain changes to cells in a worksheet. It is intended to prevent accidental or unauthorized edits, not to keep the workbook’s contents confidential.
- Protect Workbook structure: Restricts actions such as adding, deleting, hiding, or renaming sheets. It does not require a password just to open the file.
- Read-only or editing restrictions: May discourage changes, but they are not the same as encrypting the workbook for opening.
If the goal is “people can see the file only if they know the password,” choose encryption. If the goal is “people can open it but should not alter formulas or sheet layout,” consider sheet or structure protection instead. You can use more than one kind of protection, but each addresses a different risk.
How to set the opening password in Excel for Windows
These steps apply to the desktop Excel app for Microsoft 365 on Windows. The labels may be arranged slightly differently in older releases, but the encryption command is available through the workbook’s Info page in current desktop Excel.
- Open the workbook you want to protect. If it is a new file, save it first so you know where the protected copy will be stored.
- Select File, then select Info.
- Select Protect Workbook, then choose Encrypt with Password.
- Enter a strong password in the dialog box and select OK.
- Enter the same password again when prompted, then select OK.
- Save the workbook. Close it and reopen it to confirm Excel asks for the password.
Excel does not provide a separate “apply” button after the confirmation prompt; saving the file records the change. Keep the workbook in a format that supports modern Excel encryption, such as .xlsx or .xlsm. If you save in an older format, compatibility and security characteristics can differ, so avoid converting to an older file type unless a recipient specifically needs it.
Excel for Mac and Excel for the web
On current Excel for Mac, the opening-password control is under File > Passwords. Enter a value in the Password to open field, confirm it if prompted, and save the workbook. Menu wording and placement can vary by Mac version. Do not confuse this with worksheet protection on the Review tab: that controls editing, not access to the file.
Excel for the web does not provide the desktop command for adding or changing an encrypted opening password. Work with the workbook in the desktop app when you need to configure this type of encryption. A workbook encrypted with an opening password may also be unavailable for editing in the browser; if web collaboration is important, check that the intended recipients can use a compatible desktop version before relying on this workflow.
Choose and store a password carefully
The password is the key to the workbook. A short, predictable value such as a department name, a date, or “Excel123” can be guessed more easily than a long, unique passphrase. Prefer a password that is not reused on other accounts or files. A password manager can generate and store a unique value, and an organization may require a particular approved method for handling confidential files.
- Use a long, unique password rather than a familiar word or a pattern based on the workbook’s contents.
- Check that the password is entered correctly before confirming it; case and characters matter.
- Store it somewhere separate from the workbook, such as an approved password manager.
- Share it with intended recipients through a separate, secure channel rather than putting it in the same email as the attachment.
- Keep an appropriately restricted backup of the password or recovery information if losing access would disrupt important work.
For example, if a spreadsheet is attached to an email, sending the password in a separate message reduces the chance that one compromised mailbox exposes both the file and its password. It does not eliminate risk: a recipient can still copy or redistribute the workbook after opening it.
Opening, changing, and removing the password
To open a protected workbook, enter its password in Excel’s prompt. If you have the correct password but Excel rejects it, check for accidental spaces, keyboard layout differences, Caps Lock, or a character that was entered differently when the password was set. Avoid repeatedly guessing if the file is important; first verify that you are using the right password and the intended copy of the workbook.
To change or remove the password in Excel for Windows, open the workbook with its current password and go to File > Info > Protect Workbook > Encrypt with Password. To change it, replace the existing entry with a new password, confirm the new value, and save. To remove the opening requirement, delete the characters in the password box so it is blank, select OK, and save the workbook. On Mac, use File > Passwords to edit or clear the opening-password setting, then save.
Removing the password means the saved file is no longer encrypted with that opening password. If you need to keep an unlocked copy for a particular recipient, use Save As to make a separate copy and remove protection only from that copy. Be careful not to replace the protected original by mistake.
Important limits and common problems
Excel does not offer a simple way to recover a forgotten opening password. If you lose it, Microsoft support generally cannot retrieve the original password or unlock the encrypted file for you. The practical options are to look for a secure record of the password, ask the person who created the workbook, or restore an earlier unencrypted backup if one exists. This is why testing access and storing the password safely matter before the file becomes the only copy.
Other common issues include:
- The workbook opens without asking for a password: Confirm that you used Encrypt with Password, not Protect Sheet or Protect Workbook structure, and save after setting the password.
- A recipient cannot open the file: Confirm they have the correct password and a compatible desktop Excel app. A browser or preview service may not support opening the encrypted file.
- The password is rejected: Check capitalization, spaces, keyboard layout, and whether the recipient has an older or different copy of the file.
- You protected the wrong copy: Use the file’s name and location to confirm you are editing the intended workbook, especially if there are copies in email, Downloads, and cloud storage.
- Some content remains exposed elsewhere: Password protection applies to the saved workbook, not screenshots, exported PDFs, email previews, or other copies of the data.
Encryption is a meaningful safeguard for a file that might be accessed without permission, but it does not replace sensible file handling. Keep the software updated, restrict access to the storage location, and avoid leaving an unlocked copy on a shared computer.
When to use sharing permissions instead
If several people need to work on the same workbook, a shared location with account-based permissions may be more convenient than sending password-protected attachments. For example, an organization using OneDrive or SharePoint can grant access to named people, change or revoke their permissions, and keep a single shared copy. These controls depend on the organization’s Microsoft 365 setup and policies, and they are not the same as putting an opening password on the workbook.
Consider the access pattern before choosing:
- Use an opening password when you need to encrypt a standalone file before transferring or storing it.
- Use cloud sharing permissions when recipients need ongoing access to one centrally managed copy.
- Use worksheet protection when recipients should be able to open the workbook but have limits on changing cells or layout.
- Use both encryption and sharing controls when appropriate, while ensuring the people who need access can actually open the file.
A password-protected workbook does not prevent an authorized recipient from copying information after opening it. If the data is especially sensitive, follow your organization’s data classification and sharing rules rather than treating an Excel password as the only safeguard.
Frequently Asked Questions
Does protecting an Excel sheet stop people from opening the workbook?
No. Protect Sheet limits certain edits after a workbook is open. To require a password before the contents can be viewed, use File > Info > Protect Workbook > Encrypt with Password in Excel for Windows.
Can I password protect an Excel workbook for free?
The desktop Excel app includes the encryption command when you have access to a compatible licensed version. Availability depends on the app and account you use. Excel for the web does not provide the desktop setting for adding an opening password.
Can I recover a forgotten Excel opening password?
Excel does not provide a password-reset process for an encrypted workbook. Check your password manager or secure records, contact the file’s creator, or look for an earlier backup. Keep a separate, secure record before relying on the file.
Can someone remove the password after opening the workbook?
Anyone who knows the password and can edit the file can open the encryption settings and remove or change the password, then save a copy. The opening password controls access to the encrypted file; it is not a guarantee that an authorized recipient cannot redistribute its contents.
Can I open a password-protected workbook in Excel for the web?
Browser support for encrypted workbooks is limited, and an opening-password file may not open for editing there. Use desktop Excel to set the password and, when needed, to open or edit the encrypted workbook. Check compatibility before sharing with someone who relies on a browser.
Related
- Office Contact List Template Excel: Build a Useful Directory
- Excel Number Format: How It Works and When to Use It
- Excel Number Format: Meaning, Examples, and How It Works
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Heatmap Color Scale: How to Apply and CustomizeIn Excel for Microsoft 365 on Windows, select the numeric cells, then choose Home > Conditional Formatting >…
- How to Close Microsoft Excel Without Losing WorkTo close Microsoft Excel safely, save any changes first, then close the workbook or quit Excel using the…
- How to Group Dates by Year in Excel with a PivotTableTo group dates into years in Excel, place the date field in a PivotTable, right-click any date in…
- Future Out of Office in Outlook: How to Schedule ItTo schedule a future out-of-office reply in Outlook, open Automatic Replies, turn on the option to send replies…
- Track Changes in Word in Red: Step-by-Step GuideTo track edits in red in Microsoft Word, turn on Review > Track Changes, then open the advanced…
- Company Invoice Template in Excel: Setup and TipsYes. You can make a reusable company invoice template in Excel by laying out your business and customer…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.