Password Protect an Excel Sheet From Viewing: What Works

How-to basics · Updated November 21, 2026

To stop someone from viewing an Excel file, encrypt the workbook with a password to open it: in Excel for Microsoft 365 on Windows, choose File > Info > Protect Workbook > Encrypt with Password, enter and confirm a strong password, then save. Protect Sheet is different: it restricts editing, but it does not hide the sheet’s contents from someone who can open the workbook.

What “protect a sheet from viewing” really means

Excel has several protections that sound similar but solve different problems. A worksheet is one tab inside a workbook; workbook protection can refer either to controlling the workbook’s structure or to encrypting the entire file. Only a password required to open an encrypted file is the relevant option when the goal is to keep its contents private from people who do not have the password.

Here is the practical distinction:

  • Password to open: Encrypts the workbook so a person must enter the password before Excel displays its contents. Use this for confidentiality when sending or storing a file.
  • Protect Sheet: Limits selected actions, such as changing locked cells. It is mainly an editing safeguard, not a way to conceal information.
  • Protect Workbook structure: Restricts actions such as adding, deleting, moving, or unhiding sheets in the normal Excel interface. It does not encrypt the data in those sheets.
  • Hide a sheet: Removes a tab from view, but does not make its contents confidential. A hidden tab can often be unhidden, and hiding alone is not a security measure.

For example, if a workbook contains employee pay information, protecting the worksheet while leaving the file openable does not make those salaries private. A person who can open the file may still be able to view the data, copy it, or use other tools to inspect the workbook. Encrypt the file before sharing it with anyone who should not be able to open it.

Require a password to open a workbook

In Excel for Microsoft 365 on Windows, use the file encryption command rather than the worksheet protection command:

  1. Open the workbook in the desktop Excel app.
  2. Select File > Info > Protect Workbook > Encrypt with Password.
  3. Enter a strong password and select OK.
  4. Enter the same password again when prompted, then select OK.
  5. Save the workbook. Close it and reopen it to confirm Excel asks for the password.

The password is case-sensitive. Anyone who needs to open the encrypted file will need the exact password, so share it through a separate, appropriate channel rather than putting it in the same email or message as the file. If Excel does not prompt for a password after you reopen the saved file, check that you used Encrypt with Password and saved the changes.

Encryption applies to the workbook file, not just the currently selected sheet. Someone who enters the password can normally view every sheet in the workbook, including hidden ones. If different people should see different information, create separate files containing only the data each person is allowed to access, or use a controlled data-sharing system instead of relying on tabs within one workbook.

Use Protect Sheet for editing limits, not privacy

To prevent routine edits to cells, select the worksheet and choose Review > Protect Sheet. In the dialog, you can enter a password and choose which actions users may perform, such as selecting cells, formatting cells, or sorting. The available options determine what Excel allows while that sheet is protected. By default, cells are marked as locked, but the lock only takes effect after you protect the sheet.

If some cells should remain editable, select those cells first, open the cell-formatting dialog, go to the Protection tab, and clear Locked. Then protect the sheet. This is useful for a template where people should fill in designated input cells but should not accidentally overwrite formulas or headings. It is not a substitute for controlling who can read the file.

Sheet protection is intended to discourage or prevent ordinary edits, not to serve as strong security against someone determined to get at the workbook’s contents. Do not store a secret in a visible, protected cell on the assumption that the password makes it private. Use file encryption or restrict access to the file itself for confidential information.

Why hiding a sheet does not protect its contents

To hide a worksheet in the desktop app, right-click its tab and choose Hide. This can make a workbook easier to use by keeping reference data or supporting calculations out of the way. It does not encrypt the hidden sheet or remove its data from the workbook.

Protecting the workbook’s structure can stop ordinary users from unhiding sheets through Excel’s normal interface. In Microsoft 365 for Windows, choose Review > Protect Workbook, select the structure option if it is shown, and set a password. That is still not equivalent to a password required to open the file: someone with access to the workbook has the file, and structure protection is not designed to keep its contents confidential.

Use hidden sheets for organization, not secrecy. If a recipient must not see a particular table, remove that table from the copy you share. For instance, a sales workbook may contain a public summary and a private customer-level detail sheet. Sending a separate summary-only workbook is safer than hiding the detail tab and assuming recipients cannot reach it.

Choose the right protection for the job

The best option depends on what you want to prevent. A password prompt, an editing restriction, and an access permission are not interchangeable:

  • Prevent an unknown recipient from opening a downloaded file: Use Encrypt with Password, and provide the password only to intended recipients.
  • Keep collaborators from accidentally changing formulas: Use Protect Sheet, unlock only the intended input cells, and explain which cells they should edit.
  • Keep a tab out of the normal workbook view: Hide it for convenience, but do not put confidential information there unless access to the whole file is controlled.
  • Allow some people to access a cloud file but not others: Set sharing permissions in the storage service, such as OneDrive or SharePoint, and grant access only to the intended accounts.
  • Give different audiences different data: Prepare separate workbooks or reports that contain only the information each audience needs.

Cloud sharing permissions govern who can reach a stored file or link; workbook encryption requires a password to open an encrypted copy. These controls address different situations. A link with broad access can expose a file even if the sharing setting was not what you intended, while a workbook password can be forwarded along with the file. Review both the link permissions and the file’s contents before sharing.

Changing or removing the password

To change a password, open the workbook with its current password and return to File > Info > Protect Workbook > Encrypt with Password. Replace the existing password, confirm the new one, and save the workbook. Share the updated password with authorized users; the old password will no longer open the newly saved version.

To remove the password, open the workbook, go to the same Encrypt with Password dialog, delete the password shown there so the field is blank, select OK, and save. Close and reopen the file to verify that it no longer asks for a password. Removing encryption means that anyone who obtains the file may be able to open it, so do this only when that change is intended.

Keep a secure record of passwords and make sure at least one authorized person can retrieve it. Microsoft cannot recover a forgotten password for an encrypted workbook. If the password is lost, you may be unable to open the file; worksheet-protection passwords are a different kind of protection, but they should not be treated as a reliable confidentiality control either. Consider retaining a secure backup before changing access settings.

Safety, sharing, and common mistakes

A strong password should be difficult to guess and not reused from an account that matters. A longer passphrase made from unrelated words can be easier to manage than a short, predictable password. Store it in an approved password manager or another secure location, and avoid placing it beside the workbook. Encryption cannot prevent an authorized recipient from taking screenshots, copying data after opening the file, or sharing the password.

Common mistakes include:

  • Choosing Review > Protect Sheet when the actual requirement is to prevent people from opening or reading the file.
  • Hiding a worksheet and assuming its data is private.
  • Protecting the workbook structure but forgetting that this does not encrypt its contents.
  • Setting a password but not saving the workbook, then distributing an unprotected copy.
  • Sending the file and its password together in the same message, which gives a recipient both parts of the protection at once.
  • Forgetting the password or failing to give it to a legitimate collaborator.

Before distributing a file, check the exact copy you plan to send. Save it, close it, and reopen it to confirm the password prompt appears. Also inspect the workbook for hidden tabs, comments, or extra data that should not be included. File encryption protects access to the saved workbook, but it does not decide which information belongs in the copy.

Excel for Mac and Excel for the web

In Excel for Mac, workbook password controls are available in the desktop app, but the menu path differs from Windows. Depending on the current Mac version, use File > Passwords to set a password to open the workbook. Excel for Mac also has worksheet protection under Review > Protect Sheet. Check the dialog carefully so you select a password to open rather than a setting intended only to restrict editing.

Excel for the web does not provide the same desktop controls for adding, changing, or removing workbook encryption passwords. Use the desktop Excel app to set or remove a password to open. A password-encrypted workbook may also need to be opened in desktop Excel rather than edited in a browser. For files stored in OneDrive or SharePoint, use the service’s sharing permissions to manage who can access the file; those permissions are separate from workbook encryption.

Frequently Asked Questions

Can I password-protect just one Excel sheet from viewing?
Excel’s Protect Sheet feature restricts editing; it does not encrypt a single tab so that other people can open the workbook but not view that sheet. If a person must not see the data, remove it from the version you share or control access to a separate file that contains it.

Does Protect Sheet stop people from reading my cells?
No. It is primarily an editing control. A person who can open the workbook can generally see the sheet’s contents, even when the sheet is protected. Use a password to open the workbook or appropriate file-sharing permissions when the goal is to restrict viewing.

Can I recover a forgotten Excel password?
Microsoft cannot retrieve a forgotten password used to encrypt a workbook. Keep a secure copy of the password and, where appropriate, a protected backup of the file. Do not rely on sheet protection as a recovery or confidentiality method.

Can I open a password-protected workbook in Excel for the web?
Use desktop Excel to create or manage the workbook’s open password. Browser support for encrypted workbooks is limited, so download the file and open it in the desktop app if Excel for the web cannot open it or does not provide the required controls.

Does hiding a tab and protecting workbook structure make it private?
No. Those settings make it harder to change the workbook’s layout through ordinary Excel commands, but they do not encrypt the data. Remove confidential information from the shared copy or encrypt the whole workbook with a password to open.

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.