Yes. In Excel for Microsoft 365 on Windows, choose File > Info > Protect Workbook > Encrypt with Password, enter and confirm a password, then save the workbook. This encrypts the file so someone needs the password to open it; worksheet protection and a password that only restricts editing do not do the same thing.
How to require a password to open an Excel file
Use Excel’s desktop app to set an opening password. The wording may vary slightly between releases, but the Microsoft 365 for Windows path is File > Info > Protect Workbook > Encrypt with Password. Follow these steps:
- Open the workbook and, if it matters, first save a separate backup in a secure location.
- Select File, then Info. Select Protect Workbook and choose Encrypt with Password.
- Enter a strong password in the dialog and select OK. Excel asks you to enter it again to confirm.
- Save the workbook. The password requirement applies to the saved file; check that the save completes before closing Excel.
- Close the workbook and reopen it as a check. Excel should ask for the password before showing the workbook contents.
In Excel for Mac, the password controls are generally under File > Passwords. Enter a value in the Password to open field, confirm it, and save. Microsoft changes menus over time, so if the command is not visible, check that you are using the desktop app and look under File for the password settings. Excel for the web does not provide the same controls for setting an opening password.
What an opening password protects
An opening password is the workbook’s file-level protection. Excel encrypts the workbook so that its contents are not simply available to someone who receives the file. A person opening it in a compatible desktop version of Excel must provide the password before accessing the sheets. This is the relevant choice when the concern is that an unauthorized recipient might open a copy of the file.
Excel has other protection features with different purposes. Protect Sheet can limit actions such as changing locked cells, and Protect Workbook can restrict changes to workbook structure, such as adding or moving sheets. Those controls are useful for preventing accidental edits, but they are not a replacement for encrypting a file that must remain confidential. Someone who can open an unencrypted workbook may still be able to access its data by other means.
There is also a password option associated with modifying a workbook. Depending on how it was saved, a recipient may be able to open a file as read-only or choose to edit it. That is an editing restriction, not a requirement to enter a password before viewing the contents. When confidentiality is the goal, choose Encrypt with Password or the equivalent Password to open setting.
Choose the right kind of protection
Start by deciding what you want to prevent. The word “password-protect” can refer to several different outcomes, and choosing the wrong one can give a false sense of security:
- Keep people from opening the file: Set a password to open and save the encrypted workbook.
- Let people view, but discourage changes: Use a read-only recommendation or a password to modify, while recognizing that recipients can still see the data.
- Prevent ordinary edits to certain cells: Unlock the cells intended for input, then use sheet protection. This is mainly useful for controlling normal editing, not securing confidential information.
- Prevent changes to sheet layout: Protect the workbook structure. This does not hide cell contents from someone who can open the file.
For example, a budget template sent to colleagues may need locked formulas and editable input cells, not secrecy. A payroll workbook sent to a specific recipient needs file-level encryption as well as careful handling. If a file needs both confidentiality and edit controls, use the opening password for access and the relevant sheet or structure protection for editing. Treat each as a separate control.
Make the password strong and keep it recoverable
Choose a unique password that is difficult to guess and not reused for email, cloud storage, or another account. A longer passphrase made from unrelated words can be easier to store and type than a short string of complicated characters. Avoid names, company details, dates, or phrases that someone familiar with the file’s owner could guess. Excel’s password prompt is not a substitute for a well-chosen secret.
Store the password in an approved password manager or another secure recovery system. If you share the workbook by email, avoid putting the password in the same email or sending it in the same message thread. Deliver it through a separate channel whose access is limited to the intended recipient. Confirm the recipient can open the file before relying on it for a deadline or business process.
Be particularly careful with shared team files. If only one person knows the password and that person becomes unavailable, colleagues may lose access. Establish who is allowed to know it, how it will be transferred, and where an authorized recovery copy will be kept. Follow your organization’s policy for confidential or regulated information; a personal password choice may not meet its requirements.
Limitations and common misconceptions
A password does not make a workbook impossible to expose. An authorized recipient can take screenshots, copy information after opening it, or share the password or decrypted contents. File encryption helps protect a workbook that is stored or transferred, particularly if an unintended person obtains the file, but it cannot control what a person does after legitimate access.
Do not confuse encryption with a prompt that merely asks whether to open a file as read-only. Nor should a hidden sheet, a hidden row, or sheet protection be treated as a confidentiality barrier. Those features may be useful for presentation or routine editing, but they do not provide the same protection as a password required to open an encrypted workbook.
Excel’s desktop and web capabilities differ. Excel for the web cannot create or remove an opening password, and password-encrypted workbooks generally need to be opened in the desktop app rather than edited in the browser. If a recipient cannot open the workbook online, that may be a compatibility limitation rather than evidence that the password is wrong. They can use a supported desktop version of Excel and enter the password there.
Protection behavior can also depend on the workbook’s file format and the software used to open it. When confidentiality matters, use a current Excel desktop app and a modern Excel workbook format, and check the saved file by reopening it. Do not assume that a conversion to another format or an older spreadsheet program will preserve every protection feature exactly as intended.
Forgotten passwords and troubleshooting
Excel does not provide a normal “forgot password” reset for an opening password. Microsoft cannot retrieve a password that was lost, so a workbook may become inaccessible if there is no accurate record or usable unencrypted backup. Keep the password in a managed, secure place before distributing the file, and make sure the backup itself is protected appropriately.
If Excel does not prompt for a password, verify that you used Encrypt with Password rather than Protect Sheet or a password to modify. Then save, close the workbook, and open the saved copy—not a different file with the same name. If the prompt appears but the password is rejected, check capitalization, keyboard layout, accidental spaces, and whether the recipient is using the intended password. Passwords are case-sensitive.
If the password works on a desktop but the file will not open in a browser, use the desktop app. If the password dialog is unavailable, make sure the workbook is not being viewed in a mode or program that lacks the relevant feature. When troubleshooting, do not upload a sensitive workbook to an unknown “password recovery” website or tool; doing so can expose the very data the password was intended to protect.
Changing or removing an opening password
To change it in Excel for Microsoft 365 on Windows, open the workbook with its current password, go to File > Info > Protect Workbook > Encrypt with Password, replace the existing value, confirm the new one, and save. On Mac, use File > Passwords to update the Password to open value, then save. You need the existing password to open the protected workbook before changing its settings.
To remove the password, use the same setting, delete the password from the Password to open or Encrypt with Password field, confirm the change if prompted, and save the workbook. Close and reopen the saved copy to verify that Excel no longer asks for it. Removing the password leaves the file accessible without that opening barrier, so do this only when that is appropriate for its contents and storage location.
Sharing and storing a protected workbook
Encryption is only one part of handling a sensitive file. Share it only with intended recipients, check the address before sending, and use a storage location with access controls appropriate to the data. A password-protected attachment can still be forwarded, and a password sent alongside it may be exposed with the attachment. Separate the file and password delivery where practical.
For workbooks stored in OneDrive, SharePoint, or another managed service, use the organization’s sharing permissions as an additional layer; do not assume a file password replaces access management. Conversely, access restrictions on a cloud link do not necessarily protect a copy that someone downloads and later forwards. If the data is highly sensitive, ask the organization’s security or IT team which approved method to use, since it may require managed encryption, labeling, or a particular sharing workflow.
Frequently Asked Questions
Can I password-protect an Excel file so it asks before opening?
Yes. Use File > Info > Protect Workbook > Encrypt with Password in Excel for Microsoft 365 on Windows, enter and confirm a password, then save. The password is required to open the encrypted workbook.
Is Protect Sheet the same as a password to open?
No. Protect Sheet mainly limits ordinary editing actions on a worksheet. It does not encrypt the workbook to keep its contents hidden before opening. Use the file-level opening password for that purpose.
Can I open a password-protected Excel file in Excel for the web?
Opening-password encryption is not supported in the same way in Excel for the web. Use a compatible desktop version of Excel to open the encrypted workbook and enter its password.
Can Microsoft recover my Excel opening password?
No. There is no standard Microsoft reset that reveals a forgotten opening password. Check your password manager or an authorized recovery record; without the correct password or an accessible backup, the workbook may not be recoverable.
How do I remove the password from an Excel workbook?
Open it with the current password, return to the opening-password setting under File > Info on Windows or File > Passwords on Mac, clear the password, and save. Reopen the saved copy to confirm the prompt is gone.
Will a password stop someone from sharing the workbook?
No. It restricts opening a protected copy, but a recipient who can open the file can still copy or share its contents or password. Share carefully and use organizational access controls when the information requires them.
Related
- Microsoft Excel Zoom Out: Ways to Shrink the View
- Microsoft Excel vs Apple Numbers: Which Should You Use?
- Microsoft Excel Transpose Table: Methods, Limits and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Conditional Formatting: Add Color to Cells by RuleTo add color conditional formatting in Excel for Microsoft 365 on Windows, select the cells, then choose Home…
- Excel Date Validation: How to Restrict Dates in CellsExcel date validation restricts what dates users can enter in a cell. In Microsoft Excel for Microsoft 365…
- How to Sort Dates in Google Sheets: A Step-by-Step GuideTo sort dates in Google Sheets, select the whole table, choose Data > Sort range > Advanced range…
- Fill an Excel Column With Weekday Dates AutomaticallyTo fill an Excel column with weekdays, enter the first date, then enter =WORKDAY(A2,1) in the cell below…
- Autofill in Excel Based on Text: Practical MethodsTo autofill text patterns in Excel for Microsoft 365 on Windows, type one or two examples in the…
- How to Change Double Spacing to Single Spacing in WordTo change double spacing to single spacing in Word, select the text (press Ctrl+A on Windows or Command+A…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.