Can You Password Protect an Excel Spreadsheet?

How-to basics · Updated November 21, 2026

Yes. In Excel for Microsoft 365 on Windows, you can require a password to open a workbook by choosing File > Info > Protect Workbook > Encrypt with Password. Excel also lets you protect individual worksheets or the workbook’s structure, but those controls limit editing; they are not a substitute for encrypting a file that contains confidential information.

Three different kinds of Excel protection

“Password protecting a spreadsheet” can mean several things, and choosing the right kind matters. Excel has controls for access to the file, changes to sheets, and changes to workbook structure. They solve different problems:

  • Encrypt with Password: Requires the password to open the workbook. This is the relevant option when you want to keep people without the password from reading the file.
  • Protect Sheet: Restricts changes to cells and certain worksheet features. It does not encrypt the workbook or hide its contents from someone who can open it.
  • Protect Workbook: Can prevent changes to workbook structure, such as adding, deleting, moving, hiding, or renaming sheets. It does not stop someone from viewing the workbook’s data.

There is also a separate password setting that can require a password to modify a file while allowing it to be opened as read-only. That can help discourage accidental edits, but it should not be treated as a confidentiality barrier. For sensitive information, use file encryption and share the password securely.

How to require a password to open a workbook

In the Windows desktop version of Excel for Microsoft 365, open the workbook and follow these steps:

  1. Select File > Info.
  2. Select Protect Workbook > Encrypt with Password.
  3. Enter a password, select OK, and enter it again to confirm.
  4. Save the workbook.

The password is required the next time the encrypted file is opened. If you leave without saving after setting the password, do not assume the change has been applied. Close and reopen the saved file as a practical check, and make sure you can enter the password you recorded.

To remove the opening password, open the workbook with its current password, return to File > Info > Protect Workbook > Encrypt with Password, delete the password from the box so it is blank, select OK, and save. Anyone who can open the workbook and change this setting can remove its encryption, so keep access to the file itself controlled as well.

How to protect a worksheet from editing

Use sheet protection when colleagues should be able to see a sheet but should not change particular cells or worksheet features. First, decide which cells people may edit. Cells are typically marked as locked by default, but that setting only takes effect after protection is turned on. To make input cells editable, select them, open the Format Cells dialog with Ctrl+1 on Windows, choose the Protection tab, and clear Locked. Then select Review > Protect Sheet, choose the actions users may perform, and optionally enter a password.

For example, a shared expense template might leave the date, description, and amount entry cells unlocked while protecting formula cells that calculate totals. Users can enter expenses without casually overwriting the formulas. Be sure to test the sheet as a user would: protection settings can allow actions such as selecting unlocked cells, sorting, or using filters, depending on the options chosen and the layout.

To remove sheet protection in the Windows desktop app, select Review > Unprotect Sheet. If a password was set, Excel asks for it. Sheet protection is an editing aid, not strong data security: visible information may still be copied or exposed by other means, and it does not prevent someone from opening the workbook.

How to protect workbook structure

Workbook-structure protection is useful when a file has several sheets and you want to prevent users from changing how they are arranged. In Excel for Microsoft 365 on Windows, select Review > Protect Workbook, set a password if you want one, and confirm it. Depending on the Excel dialog and version, the protection option is described as protecting the workbook’s structure.

With structure protection enabled, actions such as inserting, deleting, moving, copying, hiding, unhiding, or renaming worksheets are restricted. This does not encrypt the workbook and does not, by itself, protect cell contents from editing. Use it alongside sheet protection if you need to restrict both sheet-level edits and structural changes; use file encryption when the concern is who can read the workbook at all.

Choosing the right protection for your situation

Start with the consequence you are trying to prevent. If a recipient must not see the data, an opening password is the relevant Excel control. If the recipient needs to view the data but should not alter calculations, protect the worksheet and leave only intended input cells unlocked. If the tabs should stay in place, protect the workbook structure.

  • Sending a confidential salary or customer file: Encrypt the workbook with a password, and send the password through a separate, trusted channel rather than putting it in the same email as the attachment.
  • Sharing a budget template for completion: Unlock the entry cells, protect formula cells, and test that users can still do the tasks they need.
  • Distributing a report whose tabs should not be reorganized: Protect workbook structure, while remembering that this does not make the report’s contents confidential.
  • Preventing accidental changes in a team folder: Consider file permissions or a controlled shared location as well as Excel protection. Protection passwords do not determine who has access to the folder or who can make copies.

It is possible to combine these controls, but adding more passwords does not automatically make a workbook safer. Choose settings that match the risk and avoid blocking legitimate work.

What Excel passwords do—and do not—secure

An opening password is fundamentally different from a sheet-protection password. Opening-password encryption is designed to keep the workbook’s contents inaccessible without the password. Worksheet and structure protection mainly govern actions inside a workbook after it has been opened. They are useful for workflow control and discouraging unintended edits, but they should not be relied on to safeguard confidential information.

Excel protection also does not manage every copy of a file. Someone who can access an unprotected copy, an exported copy, or a screenshot may still see the information. Likewise, a password does not replace appropriate access controls on a computer, cloud account, email attachment, or shared drive. For sensitive files, use a trusted storage and sharing method, restrict access to the people who need it, and consider whether the workbook needs to contain all of the sensitive data in the first place.

Passwords, recovery, and safe sharing

Choose a password that is difficult to guess and not reused for another account or file. A longer passphrase made of unrelated words can be easier to manage than a short, predictable password. Store it in an approved password manager or another secure place accessible to the people who genuinely need it. Do not put the password in the same message as the file if the goal is to reduce the impact of an intercepted or misdirected email.

Excel does not provide a way to retrieve a forgotten opening password. If you lose it, Microsoft Support generally cannot recover the contents of an encrypted workbook for you. Keep a secure record of the password, maintain an appropriately protected backup, and establish a handover process for files that must remain accessible if their creator is unavailable. A backup should be protected too; an unencrypted duplicate defeats the purpose of encrypting the main copy.

Excel for the web, Mac, and sharing differences

Excel for the web does not provide the same desktop workflow for applying file-level password encryption. To encrypt a workbook, use the Excel desktop app for Windows or Mac. A workbook encrypted with an opening password may not be available for editing in Excel for the web; open it in the desktop app instead. The web app has worksheet-protection features, but their controls and availability can differ from the Windows desktop steps, so check the Review tab in the version you are using.

Excel for Mac also supports password protection, but the menu layout can differ from Windows. Look under the app’s File or workbook-protection controls for password options, and verify the setting in the Mac version before sharing. If recipients use different Excel versions or other spreadsheet software, test a copy with them: protected workbooks can behave differently across apps, and an encrypted file may not be supported by every program.

For files stored in OneDrive or SharePoint, sharing permissions can limit which accounts can open or edit a file. Those permissions complement Excel’s protection rather than being the same thing. Use the organization’s approved sharing controls, especially for workbooks containing personal, financial, or business-sensitive data.

Common problems and misconceptions

A frequent mistake is choosing Protect Sheet and assuming the file is now private. It is not: sheet protection governs edits, while encryption governs opening the workbook. Another common problem is protecting every cell without first unlocking the cells users are supposed to fill in. The result is a form that looks ready but will not accept input.

Also distinguish between a password to open and a password to modify. The latter may allow a recipient to open the workbook read-only, so it does not prevent viewing. If someone reports that a password “does not work,” confirm which prompt appears, whether the correct file is being opened, and whether the password was copied with an extra space. Passwords are case-sensitive. Do not repeatedly experiment on the only copy of an important file; preserve an untouched backup before changing protection settings.

Frequently Asked Questions

Can I password protect just one Excel sheet?
Yes. Select Review > Protect Sheet and choose the actions to allow. This restricts editing on that worksheet, but does not encrypt its contents or stop the workbook from being opened.

Can someone see data in a protected Excel sheet?
Yes, if they can open the workbook, sheet protection is not meant to hide the data. To require a password before the workbook can be opened, use Encrypt with Password.

What happens if I forget an Excel opening password?
Excel does not offer a normal password-recovery process for an encrypted workbook, and Microsoft cannot generally retrieve the password. Check your password manager or secure records and any protected backups.

Can I password protect an Excel file in a browser?
Excel for the web does not offer the same file-encryption setup as the desktop app. Use Excel for Windows or Mac to set an opening password; an encrypted workbook may need to be opened in desktop Excel rather than the browser.

Is Protect Workbook the same as Protect Sheet?
No. Protect Sheet restricts actions on a worksheet, while workbook-structure protection restricts changes such as renaming or deleting sheets. Neither one is the same as encrypting the file with a password to open it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.