To require a password before anyone can open an Excel workbook in Microsoft 365 for Windows, open it and choose File > Info > Protect Workbook > Encrypt with Password. Enter a password, confirm it, and save the workbook. This is different from protecting a worksheet: an opening password encrypts access to the workbook, while worksheet protection mainly limits changes after the file is already open.
What an opening password protects
An opening password is the right choice when the goal is to prevent someone who obtains a copy of the file from reading its contents without authorization. Excel asks for the password before displaying the workbook. If the password is not supplied, the file cannot be opened normally in Excel.
This feature is often confused with Protect Sheet and Protect Workbook. The names are similar, but their purposes differ:
- Encrypt with Password: requires a password to open the workbook and encrypts the file contents.
- Protect Sheet: can restrict editing of locked cells or certain worksheet actions after the workbook is open. It is not a substitute for encryption.
- Protect Workbook structure: can prevent changes such as adding, deleting, hiding, or renaming sheets. It does not prevent someone from opening and reading the workbook.
For example, if a workbook contains employee details, protecting a sheet may prevent accidental edits but still allow a recipient to read the details. An opening password is the relevant control when the concern is someone viewing the file at all.
Set a password in Excel for Windows
These steps apply to the Microsoft 365 desktop app on Windows. The workbook must be open, and you need to save it after setting the password for the change to take effect.
- Open the workbook in Excel.
- Select File > Info.
- Select Protect Workbook, then choose Encrypt with Password.
- Enter a password in the prompt and select OK.
- Enter the same password again to confirm it, then select OK.
- Save the workbook. If Excel asks whether to replace the existing file, confirm only if that is what you intend.
Close the workbook and reopen it to check that Excel prompts for the password. This simple check can catch a missed save or a change made to a different copy than the one you plan to share. Keep the original file available until you have confirmed that the protected copy opens correctly.
Passwords are case-sensitive, so uppercase and lowercase letters must match. Excel does not show the password as you type it. If the confirmation does not match, Excel asks you to try again rather than applying the setting.
Set or change the password on a Mac
Excel for Mac has a different route in many current versions. Open the workbook and choose File > Passwords. Enter a value in the field for opening the file, confirm it if prompted, and save the workbook. The dialog may also offer a separate password for modifying the file; that is not the same as requiring a password to open it. Menu labels can vary slightly by Excel version, so use the opening-password field rather than a worksheet-protection command.
To check the result, close the workbook and open the saved copy again. Excel should request the opening password. If you use a Mac and cannot find the Passwords command, check that you are using the desktop Excel app and that the workbook is editable rather than open in a read-only preview.
Excel for the web and shared files
Excel for the web does not provide the same controls for setting or changing an opening password as the desktop app. If you need to add or remove this password, open the workbook in the Excel desktop application. A browser may also be unable to edit a workbook that is encrypted with an opening password; use desktop Excel to open it with the password, then decide whether to save a suitable copy for browser use.
A password is not the same as a sharing permission. If a file is stored in OneDrive or SharePoint, use the service’s sharing controls to choose who can access it and whether they can edit it. A workbook password can add a separate barrier, but it does not replace managing access to the account, folder, or link. Avoid sending a password in the same message or channel as the file. If a recipient receives both together, the extra barrier offers little practical separation.
Choose a password you can keep safely
Because Excel does not provide a reliable way to retrieve a forgotten opening password, choose a password that is difficult for others to guess but that you can recover from a secure record. A memorable passphrase made from several unrelated words can be easier to manage than a short, predictable password. Do not reuse a password that protects email, banking, or another important account.
Before protecting a workbook, make sure the people who need access have a dependable way to obtain the password. A password manager is generally safer than an unprotected note beside the file. For a team, document who is responsible for the password and how authorized coworkers can retrieve it if that person is unavailable. Keep the password out of the workbook itself and avoid putting it in a filename.
Consider the sensitivity of the data and the possibility that a recipient may forward the file. Limit the number of people who receive the password, and review access when a person no longer needs it. Changing the password on a file you still control can help manage future access, but it cannot make recipients forget a password they already know or erase copies they have already made.
Change or remove an opening password
To change the password, open the workbook with its current password, return to the same encryption or password dialog, replace the opening password, confirm the new one, and save. Test the saved file before distributing it. Anyone using an older copy will still need the password that was set on that copy.
To remove the password in Excel for Windows, open the workbook, go to File > Info > Protect Workbook > Encrypt with Password, clear the password field, select OK, and save the workbook. In Excel for Mac, use File > Passwords and remove the opening password in the corresponding field, then save. Removing the password means the saved copy no longer asks for it, so store or share that copy accordingly.
If you need both protected and unprotected versions, give them unmistakably different filenames and store them in locations with appropriate access controls. Otherwise, it is easy to send the unprotected copy by mistake.
Security limits and important cautions
An opening password helps protect a workbook while it is closed, but it cannot control what an authorized person does after opening it. That person may be able to copy cells, take screenshots, print, or save another copy. Worksheet protection can limit certain edits, but it should not be treated as a way to keep information secret from someone who can open the file.
Use a current Excel workbook format such as .xlsx or .xlsm where appropriate. Older formats and older versions of Office may handle security differently, so avoid relying on legacy compatibility as your security plan. For especially sensitive information, follow your organization’s approved storage and sharing rules rather than assuming a password alone meets its requirements.
Also protect the devices and accounts that hold the file. A strong workbook password cannot help if someone can access an unlocked computer, a shared account, or an unprotected copy. Encryption for a workbook and access controls on its storage location address related but distinct risks.
Common problems and fixes
- Excel does not ask for a password: confirm that you used Encrypt with Password or the opening-password field, rather than Protect Sheet or workbook-structure protection. Save, close, and reopen the exact file you changed.
- The password is rejected: check capitalization, keyboard layout, and whether the password contains characters that are being entered differently. Confirm that you are not using a password for a different copy or for editing.
- The file opens read-only or in a browser: download or open it in the desktop Excel app and use the opening password there. Read-only status may also be caused by file permissions or another user editing the file.
- You forgot the password: check your password manager, approved team records, or a secure backup of the original. Excel does not provide a dependable password-recovery function for an encrypted workbook. Do not assume that Microsoft support can reveal it.
- You cannot save after changing the setting: check whether you have permission to edit the file or whether it is stored in a read-only location. Save a separate copy to a location where you have write access, then verify that copy.
Be cautious of websites or utilities that promise to unlock any workbook. They may expose confidential data, install unwanted software, or fail to recover the file. For a work document, contact the person responsible for the file or your organization’s IT team before trying an unapproved recovery tool.
Frequently Asked Questions
Can I password-protect just one Excel sheet from opening? Not in the sense of hiding one sheet behind a secure opening password. Protect Sheet restricts certain changes, while hiding a sheet is not a security control. If a reader must not see the data, remove it from the shared workbook or share a separate file containing only the permitted information.
Is Protect Sheet the same as an opening password? No. Protect Sheet applies restrictions to worksheet editing after the workbook is open. To require a password before the workbook can be read, use Encrypt with Password on Windows or the opening-password option in Excel for Mac.
What happens if I forget the Excel opening password? Excel does not offer a dependable way to recover or reset the password for an encrypted workbook. Look for a secure record or an unprotected backup you are authorized to use. Keep a password record before you need it.
Can I password-protect an Excel file online? Excel for the web does not offer the desktop app’s controls for setting or changing an opening password. Use Excel for Microsoft 365 on Windows or the desktop Mac app, then save the workbook and check that the password prompt appears.
Does a workbook password stop people from copying data? It can prevent opening the file without the password, but it does not prevent copying after an authorized person has opened it. Use sharing permissions, limit who receives the password, and avoid including information a recipient is not meant to see.
Related
- Excel Unable to Find Circular Reference?
- Excel Turn Off Page Break Lines on Screen
- Excel Page Break Dotted Lines: How to Turn Them Off
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Hanging Indent in Word: The Shortcut and How to Use ItTo add a hanging indent in Word for Windows, place the cursor in a paragraph or select the…
- Can You Insert a Page Break in Excel? Yes, Here’s HowYes. In Excel for Microsoft 365 on Windows, select the row below or the column to the right…
- How to Delete a Page in Word Online: Step-by-Step GuideTo delete a page in Word Online, remove the text, objects, or formatting marks that are making it…
- Create an Outlook Signature: Setup and Management TipsTo create a signature in Outlook, open the signature settings for your version, choose to add a new…
- How to Add Multiple Audio Files in PowerPoint SlidesTo add multiple audio files in PowerPoint, insert each file separately using Insert > Audio, then choose how…
- Google Sheets Cell Validation: Rules, Lists, and TipsGoogle Sheets cell validation lets you control what people can enter in selected cells, using rules such as…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.