To stop someone opening an Excel workbook without your permission, use Excel’s file-encryption password: in Microsoft 365 for Windows, choose File > Info > Protect Workbook > Encrypt with Password, enter and confirm a strong password, then save. This locks the workbook itself, unlike worksheet protection, which mainly limits changes after a file is open. Keep the password somewhere safe: if you lose it, Microsoft generally cannot recover the contents for you.
The steps below are for Excel for Microsoft 365 on Windows. Use the desktop app to apply an opening password; Excel for the web does not provide the same encryption setting. If you use a Mac, see the platform-specific instructions in Step 4.
What You’ll Need
- A copy of the workbook saved locally or in a location where you have permission to edit it.
- The Excel desktop app. The menus differ on Mac, and Excel for the web cannot set this opening password.
- A strong password and a safe place to store it, such as an approved password manager. Anyone who needs to open the protected file will need the password.
Step-by-Step
-
Open the workbook in the Excel desktop app. Open the specific file you want to protect and confirm that you can access its contents. If it is stored in a shared folder or cloud service, make sure you are editing the intended copy rather than a downloaded duplicate. Consider making a backup first, particularly if this is the only copy of important information.
-
Go to the workbook’s protection settings. In Excel for Microsoft 365 on Windows, select File to open the Backstage view, then select Info. Choose Protect Workbook, then select Encrypt with Password. This is a file-level setting. Do not choose Review > Protect Sheet if your goal is to require a password before opening the file.
-
Enter a strong password. Type the password in the password box and select OK. Use a long, unique password that is difficult to guess. A memorable passphrase made from several unrelated words can be easier to manage than a short, complicated string. Avoid information someone could readily associate with you, such as a name, birthday, company name, or workbook topic. Passwords are case-sensitive, so uppercase letters, lowercase letters, numbers, and symbols must be entered exactly as chosen.
-
Confirm the password. Excel asks you to type it again. Enter it carefully and select OK. The confirmation step checks that you did not make a typing mistake when setting the password; it does not create a recovery copy. If the two entries do not match, Excel will ask you to try again.
On a Mac: In the Excel desktop app, open the workbook and choose File > Passwords. Enter a password in the field for opening the file, confirm it if prompted, and save the workbook. The exact dialog wording can vary slightly by Excel version. Do not confuse the opening-password field with a password to modify; the latter may allow someone to open a read-only copy rather than block opening.
-
Save the workbook. Press Ctrl+S on Windows or Command+S on Mac, or use File > Save. Wait for Excel to finish saving. The password is applied to the saved workbook, so do not assume it is active just because you entered it in the dialog. If Excel displays a format or compatibility prompt, read it before confirming, especially if other people rely on a particular file format.
-
Close the file and test it. Close the workbook completely, then open the saved file again. Excel should ask for the password before showing the workbook’s contents. Type the password exactly as saved. If the workbook opens without asking, check that you saved the protected copy and that you reopened that same file, rather than another copy with a similar name.
-
Share the file and password carefully. Send the protected workbook only to people who should have access. Communicate the password through a separate, suitable channel rather than putting it in the same email or message as the attachment. Tell recipients which exact file the password applies to. A password protects access to the file, but it cannot prevent an authorized recipient from copying, photographing, or sharing information after opening it.
When you need to remove the opening password later, open the workbook and enter its current password. On Windows, go to File > Info > Protect Workbook > Encrypt with Password, delete the password shown in the box, select OK, and save the workbook. On Mac, use File > Passwords and clear the opening-password field, then save. Close and reopen the saved file to check that the password prompt is gone. Removing the password means anyone who can access the file may be able to open it.
Common Mistakes
-
Protecting a sheet instead of the file. Review > Protect Sheet is intended to limit edits to cells or worksheet features. It does not stop someone opening the workbook and viewing its contents. To require a password at opening, use the encryption setting under File > Info on Windows.
-
Assuming workbook-structure protection blocks opening. Protecting a workbook’s structure helps restrict actions such as adding, moving, deleting, hiding, or renaming sheets. It is not the same as encrypting the file with an opening password. Choose the protection method based on whether you need to restrict access, editing, or changes to the workbook’s layout.
-
Forgetting the password or sharing it insecurely. Excel does not provide a normal password-reset route that restores an encrypted workbook. A password written only in a note beside the file can also defeat the purpose of protection. Store it securely and give it only to people who are meant to open the workbook.
-
Protecting one copy but sending another. Downloads, email attachments, synced folders, and files with similar names can leave several versions in circulation. Test the exact file you plan to share. Check its name and location before attaching it, and replace older unprotected copies where you have permission and it is safe to do so.
-
Expecting the setting to protect information already shared elsewhere. Encrypting this workbook does not remove copies, screenshots, exports, or pasted data that someone already has. It also does not secure a password sent in the same message as the file. Consider who has existing copies before relying on the setting.
Tips
-
Use a password manager. Save the password with a clear label that identifies the workbook and its owner. For a shared team file, use an organization-approved method for granting and removing access, rather than relying on one person’s memory or an informal group message.
-
Test with a separate copy before an important handoff. Save a test copy, apply the password, close it, and reopen it. This lets you confirm that Excel prompts for access without risking confusion about the working version. Delete the test copy afterward if it contains sensitive information and your storage rules permit deletion.
-
Keep a controlled backup. A backup can help if the file is damaged or accidentally changed, but an unprotected backup can expose the same information. Store backup copies in an access-controlled location and apply protection to each copy that needs it.
-
Consider whether a password is the right control. For particularly sensitive or regulated information, follow your organization’s security and sharing requirements. File encryption is useful, but it does not replace access controls, secure storage, or a plan for withdrawing access when someone no longer needs the file.
Troubleshooting
Excel does not ask for a password when I reopen the file. Confirm you used Encrypt with Password, not Protect Sheet or workbook-structure protection. Then check that you saved after setting the password and that you opened the same file you protected. Use File > Info on Windows to review the protection status of the open workbook. If the file was saved to a synced or shared location, allow syncing to finish and verify the correct copy.
I cannot find Encrypt with Password. Make sure you are using the Excel desktop app and have opened the workbook, then look under File > Info > Protect Workbook on Windows. Excel for the web does not offer the desktop encryption workflow. If you are on a Mac, check File > Passwords. Work or school policies, a restricted file location, or an older Excel version may also affect which controls are available; ask your administrator or use a supported desktop version.
The password is rejected. Check Caps Lock, keyboard layout, and whether the password contains characters that are easy to mistype. Try entering it in the password manager or source where it was stored, then copy it carefully if appropriate. Check for leading or trailing spaces if you pasted it. Make sure you are using the opening password for this exact workbook, not a password for a different file or one intended only for editing.
I forgot the password. Search your approved password manager, secure notes, or organization’s documented handoff records, and contact the person who created or shared the file. If it is a work file, ask your IT or records team about approved recovery options. Do not assume Excel can reset the encryption password; without the correct password, access to the workbook may not be recoverable. Avoid uploading sensitive workbooks to unapproved third-party password-removal services.
A recipient cannot open the protected workbook in a browser. Ask them to open it in the Excel desktop app and enter the password. Excel for the web does not support opening workbooks encrypted with an opening password. If desktop Excel is not available, consult your organization’s approved alternative rather than removing protection without considering the sensitivity of the data.
Frequently Asked Questions
Does Protect Sheet stop someone opening the Excel file?
No. Worksheet protection is for limiting changes to a sheet, not requiring a password before the workbook opens. Use Encrypt with Password for an opening password.
Is an opening password different from a password to modify?
Yes. An opening password prevents access to the workbook until it is entered. A password to modify can allow someone to open a read-only version without permission to make changes. Choose the option that matches the access you intend to restrict.
Can I open a password-protected workbook in Excel for the web?
Excel for the web does not support opening workbooks encrypted with an opening password. Use the Excel desktop app. The recipient will still need the correct password.
Can Microsoft recover a forgotten opening password?
Do not count on Microsoft being able to recover it. Keep the password in a secure, approved location and make sure authorized colleagues know how to access it. If it is lost, check with the file’s owner or your organization’s IT team.
Will the password protect every copy of the workbook?
It protects the saved copy to which you applied the setting. Other copies may be unprotected, especially if they were created before you set the password. Test and secure each copy you plan to distribute or retain.
Can I remove the opening password later?
Yes, if you know the current password. Open the file, clear the opening-password field in the encryption or password settings, save, and reopen it to confirm the prompt is removed. Consider who can access the unprotected file afterward.
Related
- How to Insert an Image in Google Sheets: In a Cell
- How to Insert an Image in an Excel Sheet: Full Guide
- How to Insert an Image in a Single Cell in Excel: A Guide
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Hide Columns in Excel: A Step-by-Step GuideTo hide columns in Excel for Microsoft 365 on Windows, select one or more column headers, right-click the…
- Hide Column Headers in Power BI Table VisualsTo hide every column heading in a Power BI table, select the table visual, open Format visual >…
- How to Add a Color Key in Excel for Clearer WorksheetsTo add a color key in Excel, make a small legend beside or below your data: put a…
- How to Insert an Image in Excel (Step-by-Step)To insert an image in Excel for Microsoft 365 on Windows, select the worksheet, choose Insert > Pictures…
- How to Add a New Header Section in Microsoft WordTo give part of a Word document its own header, place a section break where the new header…
- How to Pull Archive Emails in OutlookTo pull archived emails back into Outlook, find them in the Archive folder, an Online Archive mailbox, or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.