Yes. In Excel for Microsoft 365 on Windows, open the workbook and choose File > Info > Protect Workbook > Encrypt with Password, enter a password, confirm it, and save the file. This encrypts the workbook so someone needs the password to open it; worksheet protection and workbook-structure protection do not do that.
What an Excel opening password does
An opening password encrypts the workbook file. When someone tries to open the saved file in a compatible desktop version of Excel, Excel asks for the password before showing the workbook’s contents. This is the relevant setting when the goal is to keep a person who has a copy of the file from opening it.
Excel has other options that are also described as “protection,” but they have different purposes. Protect Sheet can restrict changes to cells on a worksheet, while Protect Workbook can restrict structural changes such as adding, deleting, moving, or renaming sheets. These controls can be useful to prevent accidental edits, but they are not a substitute for encrypting a file that must require a password to open.
Think of the difference this way: encrypting with a password controls access to the workbook’s contents, while sheet and structure protection control certain actions after a workbook is open. If you need both privacy and safeguards against edits, set an opening password and separately configure the appropriate editing protections.
Set a password in Excel for Microsoft 365 on Windows
Use the desktop Excel app and save the workbook after setting the password. The usual steps are:
- Open the workbook you want to protect. If it is new, save it first in a current Excel format such as .xlsx or .xlsm.
- Select File, then Info.
- Select Protect Workbook, then Encrypt with Password.
- Enter the password in the prompt and select OK. Enter it again when asked to confirm.
- Save the workbook. Close it, then reopen it to check that Excel asks for the password.
Excel passwords are case-sensitive. Treat uppercase and lowercase letters, numbers, and symbols as distinct. If the workbook is stored in OneDrive or SharePoint, make sure the saved version has finished syncing before assuming the protected copy is available to other people.
On Excel for Mac, the route differs: use File > Passwords and set a password for opening the workbook. The wording and dialog can vary by Excel version. Excel for the web does not provide the desktop command for adding or changing this file-encryption password; use the desktop app for that task.
Choose and store a strong password
A password is only useful if it is difficult to guess and you can still retrieve it when needed. A long, unique passphrase is generally more practical than a short, complicated string. Do not use a name, birthday, company name, workbook subject, or a password already used for email or another account. A password manager can generate and securely store a unique password for each protected workbook.
- Use a password that is long enough to resist guessing, and avoid recognizable personal details.
- Store it somewhere separate from the workbook, such as a trusted password manager.
- If you must send the password to a recipient, avoid putting it in the same email or message as the file.
- Confirm that each intended recipient can retrieve the password before relying on the file for time-sensitive work.
There is an important trade-off: a more secure password is also less forgiving if it is lost. Microsoft does not provide a general recovery key that unlocks an encrypted workbook when its opening password has been forgotten. A work or school organization may have its own document-management policies, but do not assume an administrator can recover the password.
Opening password versus password to modify
Excel can also use a password to modify a workbook. That option is intended to let a recipient open a file in read-only mode unless they know the password needed for editing. It is not the same as an opening password: someone may still be able to view the workbook without entering the modify password.
Choose the control based on the actual requirement. If a recipient must not see the contents, use encryption with a password to open. If they may view the file but should be discouraged from editing the original, a modify password or read-only workflow may be more appropriate. If you simply want to prevent accidental changes by colleagues who are allowed to see the data, worksheet protection may be enough.
None of these options replaces a backup. A password can prevent access, but it does not preserve an earlier version if someone with legitimate access edits or deletes the file. For shared workbooks, use version history or another managed backup process as well.
What the password does not protect
Encryption protects the saved workbook file, but it cannot prevent every form of exposure. A person who knows the password can open and copy the contents. Someone may also see data if they can access an already-open workbook on an unattended computer, a decrypted copy, screenshots, printed pages, or information pasted elsewhere.
Likewise, an opening password does not decide who is allowed to download or share a file in a cloud service. For workbooks in OneDrive or SharePoint, manage sharing permissions and access at the service level too. Restricting a link to named people, limiting access, and removing access when it is no longer needed address a different risk from encrypting a downloaded copy.
Do not rely on hidden sheets, hidden rows, hidden columns, or sheet protection to conceal sensitive information from someone who can open the file. If a recipient should not receive certain data, remove that data from the copy you share. Check formulas, comments, named ranges, hidden sheets, and other workbook content before distributing it.
Sharing and compatibility
Recipients need a compatible desktop app and the correct password. Password-encrypted workbooks cannot be opened in Excel for the web, so a browser-only recipient may be unable to use the file. Ask recipients to open it in a current desktop version of Excel, or provide a different approved format or sharing method if browser access is essential.
Older Excel versions and non-Microsoft spreadsheet apps may behave differently. A recipient might be unable to open the workbook, or a feature could be handled differently after the file is opened and saved. For important files, agree on the application and file format in advance, and test with a non-sensitive copy. Avoid converting an encrypted workbook to another format as a workaround unless you understand what happens to its protection and contents.
When sending a file, communicate the password through a separate, reasonably secure channel. For example, send the workbook through an approved file-sharing service and provide the password in a separate call or message. This does not eliminate risk, but it avoids putting both the file and its key in one easily forwarded message.
Change or remove an opening password
To change the password, open the workbook with the current password, then return to File > Info > Protect Workbook > Encrypt with Password. Replace the existing entry, confirm the new password, and save the file. On Mac, use File > Passwords and update the opening password in the available dialog.
To remove the opening password, open the file with the current password and return to the same password dialog. Clear the password field, confirm the change if prompted, and save. Close and reopen the file to verify that it no longer asks for a password. Removing the password means the saved workbook is no longer protected against opening by that password, so consider who can access the file afterward.
If you cannot open the workbook because you do not know the password, changing or clearing the setting from inside Excel is not an option: you must first open the encrypted file. Look for the password in the approved place where it was stored, or ask the person who created or manages the file. Be cautious of websites or software claiming guaranteed recovery; you may expose confidential data or install unsafe software.
Common problems and practical checks
If Excel does not ask for a password after you set one, check that you used Encrypt with Password rather than Protect Sheet or another protection command. Then save the file, close it, and reopen the saved copy. In a cloud folder, verify that you are testing the latest synced file rather than an older local copy.
If the password is rejected, check capitalization, keyboard layout, and whether Caps Lock or a different input language is active. Passwords are case-sensitive, and a symbol can be entered differently under another keyboard layout. If you copied the password from a message, check for an accidentally included space at the beginning or end.
If a recipient cannot open the file, first confirm they have the password and are using a desktop spreadsheet app that supports the encrypted workbook. Excel for the web is a common source of confusion because it cannot open password-encrypted workbooks. If the recipient still has trouble, send a newly saved test copy without confidential data and confirm the expected app and version before changing the protection on the original.
Frequently Asked Questions
Can I password-protect an Excel file so nobody can open it?
Encrypting the workbook with an opening password requires the password to open the saved file in a compatible app. It cannot stop someone who has the password or access to an already-open or unencrypted copy, so also manage file sharing and device access.
Is Protect Sheet enough to stop people opening a workbook?
No. Protect Sheet is for restricting edits to a worksheet after it has been opened. To require a password before the workbook contents are accessible, use File > Info > Protect Workbook > Encrypt with Password on Windows.
Can I recover a forgotten Excel opening password?
Excel does not provide a general reset or recovery method for a forgotten encryption password. Check your password manager or ask the file owner or administrator whether the password was recorded under an approved process. Keep a secure record before you need it.
Can Excel for the web open a password-protected workbook?
Excel for the web cannot open a workbook encrypted with a password to open. Use a compatible desktop version of Excel, or arrange another approved way to share the information with someone who only has browser access.
Does a password stop someone from editing the workbook?
An opening password controls access to the file, not what an authorized person does after opening it. Use sheet or workbook-structure protection for certain editing restrictions, and use managed sharing and backups when you need broader control.
Related
- Excel No Color Fill: How to Remove a Cell’s Background
- Excel Neutral Color Code: Hex Values and How to Use It
- Excel Monthly Employee Work Schedule: Build a Clear Plan
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Find Table Names: Where to Look and HowTo find an Excel table’s name, click any cell in that table and look at the Table Name…
- Google Sheets UNIQUE Function: Remove Duplicate ValuesTo list distinct values in Google Sheets, put your source data in a range and enter the UNIQUE…
- Google Sheets Filter Custom Formula: How It WorksYes. In Google Sheets, choose Data > Create a filter, open a column’s filter menu, then select Filter…
- Excel Page Break Character: Meaning and Print BreaksExcel does not use a special character inside a cell to create a worksheet page break: page breaks…
- Excel Get Data From Table or Range: A Practical GuideTo get data from a worksheet table or cell range into Power Query in Excel for Microsoft 365…
- How Text to Columns Works in ExcelExcel’s Text to Columns tool splits the contents of one column into separate columns, using either characters such…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.