Excel cannot password protect a folder. What it can do is encrypt a single workbook so that opening it requires a password, and it can mark a workbook as read-only or lock specific sheets and ranges. To protect a whole folder of spreadsheets, you either encrypt each file individually or move the folder into an encrypted container using a tool like Windows BitLocker, a password-protected ZIP archive, or your operating system's built-in encryption. The steps below cover the Excel-side method first, because that is what most people actually need, then the folder-level alternatives.
What You'll Need
- Excel for Microsoft 365, Excel 2021, 2019, or 2016 on Windows or Mac. The encryption options described here exist in all of these; the exact menu labels can differ slightly by version, device, and region.
- A password you will not forget. Excel offers no recovery. If you lose it, the file is gone.
- For folder-level protection: Windows Pro or Enterprise for BitLocker, macOS FileVault for Mac, or a reputable archive tool that supports AES encryption.
Step-by-Step
- Open the workbook you want to protect. Encryption applies to the file, not to a folder, so each spreadsheet you want locked needs its own password.
- Go to File > Info. On Windows this is the backstage view behind the File tab. On Mac it is File > Info as well, though the layout is slightly different.
- Click Protect Workbook > Encrypt with Password. If you do not see Protect Workbook, you may be in a read-only view or a shared workbook; close and reopen the file first.
- Type your password and click OK. Use something long and unique. A passphrase of four or five unrelated words is stronger than a short string of symbols, and easier to remember.
- Re-enter the password to confirm. Excel will not accept the setting until both entries match.
- Save the file. The password is not applied until you save. Press Ctrl+S (Windows) or Cmd+S (Mac).
- Test it. Close the workbook completely, then reopen it. Excel should prompt for the password before showing any content. If it opens without asking, the save did not take; repeat from step 2.
- Repeat for every file in the folder. There is no batch option inside Excel. If you have dozens of files, consider the folder-level methods below instead.
Protecting a folder instead
- Windows, BitLocker: Right-click the folder, choose Properties, then the General tab, then Advanced, and tick Encrypt contents to secure data. This uses EFS and is tied to your Windows account, not a typed password, so it is not portable. For a portable encrypted container, use BitLocker To Go on a drive, or a VeraCrypt container. BitLocker requires Windows Pro or Enterprise; it is not in Home.
- macOS: Use Disk Utility to create an encrypted disk image (File > New Image > Blank Image, choose AES-128 or AES-256 encryption, set a password). Drag your Excel files into the mounted image. When you eject it, the contents are encrypted.
- Cross-platform ZIP: Use 7-Zip on Windows or Keka on Mac to create an archive with AES-256 encryption. Note that the built-in Windows "Send to > Compressed folder" does not support passwords at all, so do not rely on it.
Common Mistakes
- Confusing sheet protection with file encryption. Review > Protect Sheet stops edits to cells but anyone can open and read the file. Only Encrypt with Password stops someone opening it.
- Assuming a password on one file covers the folder. It does not. Each .xlsx is a separate container.
- Forgetting that read-only recommended is not security. File > Info > Protect Workbook > Always Open Read-Only is a suggestion, not a lock. Anyone can click past it.
- Saving over the original before testing. Keep an unencrypted backup until you have confirmed the password prompt appears, then delete the backup securely.
- Emailing an encrypted file without sharing the password separately. Send the password through a different channel, such as a phone call or a password manager share, not the same email.
Tips
- Store the password in a password manager. Excel's encryption is strong enough that brute-forcing it is impractical; there is no legitimate recovery service.
- For shared work, protect the structure with Review > Protect Workbook and lock specific ranges with Review > Allow Edit Ranges, then apply a sheet password. This lets colleagues edit the cells you permit without unlocking the whole file.
- If you use Microsoft 365 with OneDrive or SharePoint, consider sensitivity labels or restricted access instead of a file password. These survive sharing and can be revoked, which a static password cannot.
- Name encrypted files clearly, for example budget-2024-encrypted.xlsx, so nobody wastes time trying to open one without the password.
Troubleshooting
The password prompt does not appear. The file was probably not saved after setting the password. Reopen it, set the password again, and save. If the file lives on a synced cloud folder, wait for the sync to finish before testing on another device.
Excel says the password is incorrect. Check Caps Lock, keyboard layout, and any trailing spaces. If you copied the password from a note, make sure you did not copy a line break.
You forgot the password. There is no built-in recovery. Restore an earlier unencrypted copy from backup or version history if one exists. Otherwise the file cannot be opened.
The Encrypt with Password option is greyed out. The workbook may be open in Protected View, marked as final, or shared. Close and reopen it, and if it came from an email or download, click Enable Editing first.
The file opens but sheets are locked. That is sheet protection, not encryption. Go to Review > Unprotect Sheet and enter the sheet password, which may be different from the file password.
Frequently Asked Questions
Can I password protect an entire folder in Excel itself?
No. Excel only encrypts individual workbooks. Use BitLocker, a macOS encrypted disk image, or an AES-encrypted ZIP for the folder.
Does Encrypt with Password work in Excel Online?
You can open a password-protected file in Excel for the web if you supply the password, but setting or changing the password is done in the desktop app. Use the desktop version to apply encryption.
Is Excel's password encryption actually secure?
Modern Excel uses AES encryption for files saved in the .xlsx format, which is strong. Older .xls files use weaker protection. Save as .xlsx before encrypting.
Can I recover a forgotten Excel password?
Not through Microsoft. There is no official recovery. Your only option is restoring an unencrypted backup or version history copy.
What is the difference between Protect Workbook and Encrypt with Password?
Protect Workbook restricts structural changes such as adding or deleting sheets. Encrypt with Password prevents the file from opening at all without the password.
Will a password-protected Excel file still sync to OneDrive?
Yes, the encrypted file syncs normally. Anyone opening it from OneDrive will still need the password.