Excel TVExcelTV

How to Password Protect an Excel File

Teal-lit computer keyboard beneath a circuit-board pattern representing digital file security

Password protecting an Excel file is one of the fastest ways to keep a spreadsheet private, especially when the workbook contains payroll data, pricing, customer lists, or forecasts. I usually treat it as the first layer of defense, then add sharing controls and workbook protection where needed. For a full collection of protection and security guides, see our Data Protection category.

Key takeaways

Use file encryption for access control and workbook protection for structure control. Microsoft organizes Excel protection into 3 levels—file, workbook, and worksheet—and lists 5 file-level choices. Choose encryption when opening must be restricted; use workbook or worksheet controls only for structure or editing behavior.

  • In Excel for Windows, use File > Info > Protect Workbook > Encrypt with Password when you need to control who can open the file.
  • Use workbook protection when you only need to lock the structure, not the data itself; see Excel workbook protection.
  • Keep the password in a manager or approved vault, because Excel does not give you a friendly recovery path if you forget the open password.
  • Treat password protection as one layer, not the whole security plan.

Source: Microsoft’s Excel specifications document 1,048,576 rows and 16,384 columns per worksheet.

How do you password protect an Excel file?

In Excel for Windows, use Encrypt with Password when the file should prompt before opening. Microsoft’s file-protection procedure uses 4 steps: open File > Info, choose Protect Workbook > Encrypt with Password, enter the password, and confirm it. Encryption places the credential prompt before confidential content loads.

Step-by-step: add an open password in Excel for Windows

Step 1: Open the workbook in Excel Step 1: Open the workbook in Excel

Step 2: Go to File menu Step 2: Go to File

Step 3: Select Info Step 3: Choose Info

Step 4: Click Protect Workbook Step 4: Select Protect Workbook

Step 5: Select Encrypt with Password Step 5: Click Encrypt with Password

Step 6: Enter password Step 6: Type a strong password and confirm it

Step 7: Save the file Step 7: Save the file

Once you save, close the workbook and reopen it to confirm the prompt appears. I always do that extra check because a security setting that is only assumed is not a security setting at all.

Excel for Mac and Excel for the web

On a Mac, open the workbook and choose File > Passwords, enter a Password to open, confirm it, and save. Microsoft’s Mac guidance documents that path. For Windows-and-Mac interoperability, keep the password to 15 characters or fewer: Microsoft warns that Excel for Mac cannot open a Windows-protected workbook when its password exceeds 15 characters.

Excel for the web can open and edit a password-protected workbook, but it cannot add, change, remove, or recover the password. Microsoft’s web guidance directs you to the desktop app for those actions.

What happens after you set the password?

Excel encrypts the workbook so the file cannot be opened without the password. That is different from simply hiding a sheet or marking a file read-only. If the workbook holds anything sensitive, I want the prompt to happen before the contents load, not after the file is already open.

My practical recommendation

If the workbook is shared with a small team, write down who is allowed to know the password and where the approved copy lives. A file-level password works best when the process around it is just as disciplined as the spreadsheet itself.

What does an Excel file password actually protect?

An open password protects file access, not just visible sheet tabs. Microsoft distinguishes 3 protection levels: file, workbook, and worksheet. File encryption controls opening; workbook protection controls structure; worksheet protection controls editing. Hiding a sheet or marking a workbook read-only is therefore not a substitute for encryption.

Password to open vs workbook protection

These two features are easy to confuse, but they solve different problems:

FeatureWhat it doesWhen to use it
Password to openEncrypts the workbook so Excel requires a password before openingUse for confidential files
Workbook protectionPrevents users from adding, deleting, renaming, moving, or hiding sheetsUse for structure control
Worksheet protectionLimits edits inside a sheetUse to lock formulas or important cells

If your goal is to protect the file itself, open password encryption is the right choice. If your goal is to stop someone from rearranging tabs, the workbook-level setting is better. For a deeper structural example, I also recommend reading Excel workbook protection.

When I would use both

In real workbooks, I often use both encryption and workbook protection together. For example, a finance model might need encryption to control access and workbook protection to stop sheet tampering. That combination is especially useful when several people open the file but only a few are allowed to change its structure.

What it does not protect

Password protection is useful, but it is not magic. It does not replace good sharing habits, secure storage, or a review process for sensitive spreadsheets. If someone already has the password, they have access. That is why I treat the password as a gate, not as the entire security plan.

Source: Microsoft’s Excel security guidance separates file encryption, read-only behavior, and worksheet/workbook protection into different tools. That separation is the main clue that Excel security is layered, not one-size-fits-all.

How do you change or remove the password later?

On Windows, change or remove an open password by returning to Encrypt with Password; on Mac, use File > Passwords. Microsoft documents 4 key facts: passwords are case-sensitive, cannot be retrieved, have no general Windows composition restrictions, and require caution when shared. Save, close, and reopen the file to verify the change.

To change an existing password in Windows

  1. Open the workbook with the current password.
  2. Go to File > Info > Protect Workbook > Encrypt with Password.
  3. Replace the current password with a new one.
  4. Save the workbook.
  5. Close it and reopen it with the new password to verify the change.

I always test the new password right away. It takes less than a minute, and it avoids the worst-case scenario where you assume the password changed but the old one is still in circulation.

On a Mac, choose File > Passwords, replace the Password to open, confirm it, save, and reopen the workbook.

To remove the password entirely in Windows

  1. Open the workbook with the password.
  2. Go back to Encrypt with Password.
  3. Delete the password from the box so it is blank.
  4. Save the file.
  5. Reopen it to make sure Excel no longer asks for a password.

Only do this when the file no longer needs privacy controls. If the workbook still contains sensitive data, I would rather keep the password in place and reduce access elsewhere first.

On a Mac, return to File > Passwords, clear the Password to open, save, and test the workbook again.

A safer workflow for teams

If more than one person uses the file, document the change in a secure place and confirm the updated password with everyone who should have it. A shared spreadsheet can lose control quickly if different people are editing, copying, or forwarding outdated versions.

What makes a good Excel password?

A good Excel password is memorable to authorized users, difficult for outsiders to guess, and stored safely. Microsoft’s Windows file-protection page gives 4 warnings, including case sensitivity and no general length or composition restrictions. For Mac interoperability, however, use no more than 15 characters.

My practical rules for password strength

  • Use a long passphrase instead of a short random string you will forget.
  • Avoid names, dates, company names, and spreadsheet terms.
  • Do not reuse the same password across different workbooks.
  • Store the password in a manager or approved vault.
  • If the workbook is business-critical, assign an owner for the password.

I also recommend avoiding a “one password for everything” culture. It is convenient in the short run, but it creates a lot of risk if one password leaks.

Keep the password usable

Security that nobody can operate tends to get bypassed. The best Excel password is the one people can use correctly when they need to open the file, while still being hard for outsiders to guess. That usually means a long phrase with enough randomness to resist guessing, but enough meaning for your team to remember.

Don’t forget the process

The password itself is only half the job. You also need a way to handle handoff, turnover, and recovery. I like to record where the password is stored, who owns it, and what the approved process is for changing it later.

When should you use workbook protection instead of encryption?

Use workbook protection to control spreadsheet structure, not the ability to open the file. Microsoft lists 5 structure changes it can prevent: adding, moving, deleting, hiding, and renaming worksheets. Encryption solves the separate access problem, so use structure protection for layout control and encryption for opening.

Use workbook protection when you want to:

  • Stop users from adding, deleting, moving, hiding, or renaming sheets.
  • Keep the workbook layout stable for reports or models.
  • Protect the structure without blocking access to the file itself.

If that is your goal, Excel workbook protection is the better fit.

Use encryption when you want to:

  • Prevent the workbook from opening without authorization.
  • Protect financial data, customer records, or confidential calculations.
  • Add a true access barrier instead of just a layout guardrail.

Use both when the workbook is sensitive

A lot of business files need both layers. For example, a forecast file might need encryption to restrict access and workbook protection to stop accidental sheet changes. I usually think of encryption as the front door and workbook protection as the internal door lock.

What if you forget the Excel password?

If you forget an open password, Microsoft’s file-protection page gives 4 warnings; the first says Microsoft cannot retrieve forgotten passwords. The page also says passwords are case-sensitive. Secure storage, ownership, and backup planning must therefore be part of the protection design before someone gets locked out.

Best practices to avoid lockout

  1. Store the password in a secure manager.
  2. Keep a record of which team owns the file.
  3. Document how password changes get approved.
  4. Test the password immediately after setting it.
  5. Keep at least one controlled backup copy of the workbook.

If the password is lost

If the password is gone and there is no approved recovery route, your practical options are usually limited. That is why prevention matters so much. I would rather spend a minute documenting the password now than spend hours trying to reconstruct a locked file later.

If the file is business-critical

For high-value files, pair encryption with version history, controlled storage, and access management. Password protection is useful, but it should sit inside a broader process for sensitive information.

A quick source-backed checklist

Microsoft documents 3 protection levels, while Excel specifications list 1,048,576 rows by 16,384 columns per worksheet. That scale makes the choice concrete: encrypt files to control opening, then add workbook or sheet protection only for structural or editing controls.

  • A single Excel worksheet can hold 1,048,576 rows and 16,384 columns, so spreadsheets can concentrate a lot of sensitive data.
  • Microsoft separates file encryption from workbook protection.
  • An open password is the right choice when you need to control who can open the file.
  • Workbook protection is the right choice when you only need to lock the sheet structure.
  • Password managers reduce the risk of lockout and re-use.

Sources: Microsoft Support on file encryption; Microsoft’s workbook protection guidance; Microsoft’s Excel specifications.

FAQ

Open-password encryption controls access, while workbook protection controls structure. Microsoft separates protection into 3 levels and lists 5 file-level choices. The five FAQs below clarify recovery, limits, and ownership so teams that password protect workbook files do not confuse encryption with sheet or structure controls.

What is the difference between a password to open and workbook protection? A password to open encrypts the file so Excel asks for credentials before the workbook opens. Workbook protection only locks the sheet or workbook structure, which means users may still be able to read the file if they already have access.

Can I recover an Excel password if I forget it? Not through a built-in recovery path in Excel. If you lose the open password, the practical answer is to keep a secure backup of the password with a manager or approved company process before you need it.

Does password protection stop every kind of unauthorized access? No. It raises the bar, but it is not a full security program. Pair encryption with access controls, sharing discipline, version control, and workbook protection when the file only needs structural locking.

Should I use workbook protection instead of encryption? Use workbook protection when you want to stop sheet adds, deletes, renames, or moves. Use encryption when you want to control who can open the file at all. Many sensitive workbooks need both.

What should I do when a team shares the protected file? Assign one password owner, store the password in an approved manager, and document every change. Share the file and password through separate controlled channels, keep access limited, and make sure everyone works from the current approved copy.

Final thought

Password protecting an Excel file controls access, while workbook protection controls structure. Microsoft defines 3 protection levels: file, workbook, and worksheet. To encrypt Excel content, use file-level protection, store its case-sensitive password safely, and add structure or sheet controls only where they serve a separate purpose.

Sources: Microsoft Support on file encryption; Microsoft’s workbook protection guidance; Microsoft’s Excel specifications.

Written by

Allen Hoffman

Contributor, Excel TV

  • Lookup Functions
  • Data Manipulation
  • Keyboard Shortcuts
  • Workflow Efficiency
Allen Hoffman is a contributor to Excel TV focused on practical Excel techniques for everyday data work. His tutorials cover topics including lookup functions, data manipulation, cell formatting, keyboard shortcuts, and workflow efficiency. Allen's writing aims to make common Excel tasks clearer and faster, with step-by-step guidance suited to analysts and professionals who use Excel regularly in their work.

Read more articles by Allen Hoffman

Editorial standards

Fact Checking & Editorial Guidelines

Every article on Excel TV is held to a published editorial standard. The goal: accurate, current, and useful — without filler.

  1. Expert review.Drafts on technical Excel topics are reviewed by a contributor with hands-on, working knowledge of the feature being covered.
  2. Source validation.Claims about Excel behavior are tested in current Microsoft 365 builds. Third-party product claims are sourced from the vendor's own documentation.
  3. Disclosure.Affiliate links, sponsorships, and any commercial relationships that influenced a piece are disclosed in-line and at the foot of the article.
  4. Updates.Articles are revisited when Microsoft ships changes that affect the content. The most recent revision date is shown on every post.

Spot a problem? Email editor@excel.tv and we will look at it.

Subject-matter review

Reviewed by Subject Matter Experts

Technical Excel articles are reviewed by contributors with verifiable, hands-on experience in the topic — not generalist editors.

  • Qualified reviewers.Reviewers include Microsoft Excel MVPs, working business-intelligence practitioners, and Excel TV editorial staff. See each author's page for credentials.
  • Current to a known Excel build.Procedural articles state which Excel version they were validated against. Where Microsoft has since changed behavior, the article carries an inline update note.
  • Clarity check.Reviewers verify steps are reproducible by a reader at the assumed skill level — not just technically correct in a vacuum.

Want to contribute or review for Excel TV? See the about page.