If your Excel workbook is locked by a password, file protection, or macro security—whether accidentally or intentionally—you can unlock it using simple built-in methods. No third-party tools are required, and the solutions below work for both locked cells and entire files. Start with the methods listed first; if none resolve the issue, check for hidden protection schemes.
What You'll Need
- An unprotected copy of the file (if the original is locked, back up first)
- Microsoft Excel installed on your computer (version 2016 or later recommended)
- Your password (if known) or the ability to reset it via file properties
Step-by-Step
- Check for a password prompt
When you open the file, Excel may display a prompt like "This file is password protected." If you recognize the password, enter it and confirm. If you don’t recognize it, proceed to the next step. - Unlock cells without a password
If only specific cells are locked (e.g., due to formulas or protection settings), follow these steps:- Open the workbook.
- Go to Review > Unprotect Sheet (this works if the sheet protection password is set). If prompted, enter the password you used to lock it.
- Click OK to unlock.
- If no sheet protection is set, check for locked cells: Select the locked range (e.g., click the headers, then press Ctrl+Shift+F to find locked cells), right-click, and choose Unlock Selection.
- Remove file-level encryption (if applicable)
If the entire file is password-protected via file properties (e.g., saved with a password or a macro virus), you’ll need to bypass this:- Close the locked workbook.
- Open File Explorer, right-click the locked file, and select Properties.
- Go to the General tab and look for the Unlock or Copy option (some versions show a "Get Info" button in Finder/Mac).
- If "Unlock" isn’t visible, rename the file extension from
.xlsxto.zip. Right-click the file, choose Extract All, and explore the folder structure. Inside, you’ll find anxlfolder—open it and renamexl/worksheets/sheet1.xmltosheet1_unlocked.xml. Save the changes, rename the folder back to.xlsx, and reopen the file. The password may now be removed.
- Use Excel’s built-in reset (for corrupted or misapplied protection)
If Excel complains about the file being "corrupted" or prompts for an invalid password:- Open Excel and go to File > Info.
- Click Manage > Open & Export > Open & Export (or Open > Open & Export in older versions).
- Select the locked file and click Open. If prompted, choose Trust Access to load the file (this bypasses most encryption).
Common Mistakes
- Entering the wrong password repeatedly: Excel may lock the file after 2–3 failed attempts, requiring a factory reset or file extraction. Always back up important data first.
- Forgetting to check Review > Unprotect Sheet for sheet-level locks: Only cell-level locks require unlocking individually.
- Assuming all locked files are encrypted: Some locks are due to accidental formatting (e.g., "Protect Sheet" misclicks). Verify in Review > Protection.
- Skipping the file extension trick for file-level passwords: Without renaming the file, you’ll need to restore it from a backup or use a third-party tool (which we don’t recommend).
Tips
- For workbooks with macros: Enable macros first (via File > Options > Trust Center > Trust Center Settings > Macro Settings) and then try opening the file. Some viruses lock files after disabling macros.
- If you’re unsure of the password, avoid the file extension trick while copying it to another drive to prevent accidental data loss during extraction.
- Use Ctrl+Z to undo accidental protection changes if you’ve already made edits.
- For large files, back up the workbook before modifying files or extensions to avoid corruption.
Troubleshooting
If none of the above work, try these advanced steps:
- Check for hidden macros
Some locks are triggered by malicious macros. Open File > Options > Trust Center > Macro Settings and set it to Disable All. Close Excel, rename the locked file’s extension to.zip, extract it, and inspect thexl/worksheetsfolder for suspicious files. Rename or delete them, then re-zip and reopen the file. - Restore from a backup
If the file is critical, use a third-party tool (likeWinRARor7-Zip) to extract the file and manually copy only the unlocked sheets to a new workbook. - Factory reset Excel
If the issue persists, reset Excel to its default settings:- Close Excel. Press Win+R, type
appwiz.cpl, and hit Enter. - Find Microsoft Excel, right-click > Uninstall. Reinstall from the Microsoft Store.
- After reinstalling, reopen the file—some locks are tied to the application.
- Close Excel. Press Win+R, type
- Contact IT support
If the file belongs to an organization and you don’t have permission to edit it, contact IT. They may have encrypted the file for security reasons.
Frequently Asked Questions
Why won’t my Excel file open?
Excel won’t open if the file is password-protected (file-level or sheet-level), corrupted, or locked by a macro virus. Try opening it in "Trust Access" mode (via File > Info > Manage > Open & Export > Open) or reset the protection as shown above.
How do I unlock a file I forgot the password for?
If you forgot the password, you’ll need to extract the file (rename the extension to .zip, extract, and edit the xl/worksheets folder) or use a professional decryption tool (only for personal use—official support may not cover this). Avoid pirated tools, which may damage files.
Will unlocking a locked file delete my data?
No, but you must back up the file first. Renaming the extension to .zip or modifying XML files can risk corruption if done carelessly. Always copy the original before editing.
Why is my Excel file locked after a virus scan?
Some malware locks files to extort money or prevent data access. Check for suspicious macros (via File > Options > Trust Center > Macro Settings), and restore from a backup if the file is corrupted.
How do I unlock a locked workbook in Mac Excel?
The steps are identical to Windows. On Mac, go to File > Options > Trust Center > Trust Center Settings > Macro Settings to disable macros first. If the file is file-locked, rename the extension to .zip, extract, and edit the xl folder manually.
Can I unlock an Excel file encrypted by Office 365?
Office 365 encrypts files differently. If the file was encrypted at the account level (e.g., OneDrive), you’ll need to re-upload it or contact your IT admin. For local encryption, use the file extension trick or File > Info > Open & Export > Open.