In most cases you can easily remove Excel password protection if you’ve forgotten the password.
However, the likelihood of your success depends on which password protection method was used, as some of the four options below are more robust than others.
Excel password protection is available for:
- Sheets
- Workbooks
- File Open
- File Edit
Each method requires a slightly different solution to remove the password.
Before we get started, keep in mind that password protection for worksheets and workbooks was designed to prevent users breaking your files, as opposed to keeping your data confidential.
If you’re relying on it for this purpose, you might want to reconsider your approach. This post is written on the basis that you’re being ethical and only unlocking your own files where you’ve forgotten the password and not trying to hack into confidential files.
Table of Contents
Watch the Video
Remove Excel Worksheet Password Protection
Excel worksheet protection is applied via the Review tab > Protect Sheet:
A password is optional:
If you enter a password here and later forget it, it’s easy to unlock the protected sheet.
Unprotect Sheets Without Password
Step 1: The first thing you’ll want to note is which sheet in the file contains the password protection. Notice there are three sheets in the file. The second sheet called ‘Sales Data’ is the one protected.
Note: if you rearranged the sheets in your file after inserting them, the numbers will not be in sheet tab order. To find out the sheet number, right-click a sheet tab > View Code:
Step 2: Close the file and make a copy just in case you make a mistake!
Step 3: Rename the file and change the extension to .zip
Tip: if you can’t see the file extensions, go to the View tab in your File Explorer and check the box ‘File name extensions’:
Step 4: Drill down through the zip file folders: xl/worksheets/ and select the .xml file for the sheet containing your password.
Notice the sheet tab names are not visible here, hence why you need to know which sheet you applied the password to.
Step 5: Copy the sheet .xml file to another location outside of the zip folder and open it in a text editor like Notepad.
Step 6: CTRL+F to find the text ‘sheetProtection’. Delete everything between the < > tags. See highlighted example below:
Step 7: Save the file and copy it back to the xl/worksheets folder, replacing the original file.
Step 8: Rename the file type from .zip back to .xlsx
Now you can open the file and the worksheet protection will be gone.
If you have multiple sheets with worksheet protection, you can repeat steps 5 through 7 above for each sheet.
Unprotect Workbooks Without Password
Workbook protection is applied via the Review tab > Protect Workbook:
It enables you to protect the structure of the workbook, preventing sheets being added, removed, hidden/unhidden etc.
The process for unprotecting a workbook is similar to unprotecting worksheets.
Step 1: Close the file and make a copy just in case you make a mistake!
Step 2: Rename the file and change the extension to .zip
Step 3: Drill down through the zip file folders: xl/ and select the workbook.xml file.
Step 4: Copy the workbook.xml file to another location outside of the zip folder and open it in a text editor like Notepad.
Step 5: CTRL+F to find the text ‘workbookProtection’. Delete everything between the < > tags. See highlighted example below:
Step 6: Save the file and copy it back to the /xl/ folder, replacing the original file.
Step 7: Rename the file type from .zip back to .xlsx
Now you can open the file and the workbook protection will be gone.
Unprotect Read Only Workbooks Without Password
Read only protection is set up when you save the file. Click on the Tools drop down > General Options:
When opening a Read Only password protected file, you’ll be prompted to enter the password. If you don’t have it, or you’re happy to open it in Read Only mode, you can click the Read Only button
To remove the password on a Read Only file:
Step 1: Close the file and make a copy just in case you make a mistake!
Step 2: Rename the file and change the extension to .zip
Step 3: Drill down through the zip file folders: xl/ and select the workbook.xml file.
Step 4: Copy the workbook.xml file to another location outside of the zip folder and open it in a text editor like Notepad.
Step 5: CTRL+F to find the text ‘fileSharing’. Delete everything between the < > tags. See highlighted example below:
Step 6: Save the file and copy it back to the /xl/ folder, replacing the original file.
Step 7: Rename the file type from .zip back to .xlsx
Now you can open the file and the Read Only protection will be gone.
Tip: Another option with Read Only files is to open the file in Read Only mode, then Save As a copy without the password.
Unprotect Excel Files Without Password
If your file is password protected and there is no option to open it in Read Only mode i.e. you get the dialog box below when opening the file:
You cannot use any of the techniques above. If you try to change the file type to .zip and then open the zipped folder, you’ll get this error:
Password protection at the file level is the most secure way to protect your data, but it’s still not completely secure.
You can purchase third-party apps to unlock Excel files. Just be sure you’re being ethical and only unlocking your own files.
Fortunately, I’ve never needed to remove a password at this level, so I don’t have any firsthand experience of apps I can recommend.
annandaak
Thanks a lot! Now I can open my worksheet
Mynda Treacy
Pleased to hear that!
Tim
I couldn’t find the “sheetProtection” line in the xml file for my worksheet. I did some digging and found that the sheet number of the file doesn’t always match the sheet number of the code within that file. I opened every one the of xml files and looked in each one of the “sheetPr codename” lines, which shows the sheet number. It turns out my sheet 25 is actually stored in the sheet2 file. I don’t know why the file name doesn’t always match the code within, but this would be the way around that.
Mynda Treacy
Thanks for sharing your experience, Tim. The sheets are issued with a number when they’re inserted in the workbook. This is persistent in Excel’s XML irrespective of the name you end up giving it on the tab. This enables you to reference sheets in VBA without an error occurring if a user renames the sheet tab.
Allan B
This worked like a champ to unprotect worksheets as long as you follow the directions explicitly. I was having trouble until I saved the modified xml files in a separate area and then use copy/replace as you demonstrated. You saved me many hours of work! Thanks.
Mynda Treacy
Awesome to hear, Allan!
Rodrigo
Hi, I am trying to unprotect sheets and workbook, I remove the text as you explained but finally when I try to open the xlxs a warning message saying that the file is corrupted, is shown and no way to open or repair. Can you help me on this
Rgds
Mynda Treacy
Not sure, Rodrigo. If you’re happy to post your question on our Excel forum where you can also upload your file and we can help you further.
David
Hello.
Thank you for your helpful tips. Please, is there a way I can unlock a protected header/footer in Excel?
Mynda Treacy
Hi David,
I believe the header/footer protection falls under the workbook protection, so once you’ve removed that level of protection, you should be able to access them. If you’re still stuck please post your question on our Excel forum where you can also upload your file and we can help you further.
Mynda
Mahmudul Hasan
another easy way of unprotected excel file is—–Just upload your protect file is google drive, edit anything. Than save it. It will become an unprotected sheet. This techniques only applicable for worksheets/workbooks lock
Mynda Treacy
Thanks for sharing
Jason Grant
I’ve tried this method over the years and have been successful in the past but now when I change the extension to zip and open it I’m not seeing those xml files? I’ve tried 7zip, winrar, etc. Any idea?
Mynda Treacy
Hi Jason,
That’s usually an indication that the password is at the file level, as per the last example in the tutorial above.
Mynda
E
Very clearly explained. Thank you!
Mynda Treacy
Glad you thought so, thank you!
Susan M
Thank you so for your newsletter today that led me back to this post. We work from spreadsheets that were saved & updated & copied & pasted multiple times over the last 20 years, and sometimes we find a random locked sheet in the workbooks. This worked perfectly so I was able to fix one of our files today and saved us the hassle of copying and renaming and reinserting the worksheet from another similar file. Thanks for all the wonderful Excel tips and best wishes for 2023.
Mynda Treacy
Wonderful to hear, Susan! Best wishes for 2023 to you too 🙂
Alan James
Password protected Excel files are AES encrypted. Providing you use a reasonable length password then no tool is going to crack it.
See How to encrypt Excel Workbook
“Microsoft uses AES with a 128bit key, plus SHA1 salt and cipher block chaining for encryption
Currently, no practical methods can break or crack the algorithm provided by Microsoft.”
Mynda Treacy
Interesting, Alan. Thanks for sharing. Wikipedia also has some informationhere on the history and different types of encryption used by different versions of Excel.