It is always annoying when forgetting passwords. It is also annoying when you inherit a document from a previous employee and it is protected by a password only they knew. But your boss asked for you to get the data from that spreadsheet and change some things and Right now! What are you going to do?
Well the good news is that if the document isn’t encrypted, this process is pretty straightforward. You will be up and running in no time! AND you don’t have to spend $40 on some software you will use only once.
If you need to crack a Word Document as well, check out my Crack Microsoft Word Password Free post.
Crack Microsoft Excel Password Instructions
These instructions cover the process of breaking edit/read only protection on Microsoft Excel workbooks and worksheets. This WILL NOT work on Excel files that have been encrypted.
There can be a number of reasons for breaking password protection on an Excel file. Before we start, please note that I take zero responsibility for the results of these instructions. You are the master of your own actions and by proceeding, you take full responsibility of your own actions.
Step 1: Make a Backup of Your File
You will be making changes to the internal structure of your document. It is good practice to create backups before starting.
Step 2: Check your file format
This will only work on Excel files that are 2007, 2010, 2013 and have “.xlsx, .xlsm” formats. If your document is in an older format “.xls” from Excel 2003 or older, open in Excel 2007, 2010, or 2013 and save as an “.xlsx file”. If your excel file has macros, save as an “.xlsm” file to enable macros.
Step 3: Disassemble your Document
Because the .xlsx file format is based on a tree structure with XML files, it is easy to disassemble. For this example, I protected both the individual worksheet and workbook on my sample excel file. We will break this protection by changing some settings in the file.
For the disassembly process, the main file compression utility in windows will work just fine. For the first part of this demo, I am using WinRAR (Free to download). If you can’t install WinRAR, please scroll down to see the alternate disassembly process using the Windows built-in file compression tool.
Disassembly with WinRAR:
- Open WinRAR and click the File menu.
- Select Open archive.
- Set the file type at the bottom from “all archives” to “all files”.
- Locate your Excel file and click “Open”
Step 4: Remove Password Protection
The root view of the excel file structure:
The files you are going to edit are in the xl folder that is circled in red.
For Workbook(whole excel file) Settings:
For Individual Worksheet File Settings:
xl>worksheets>sheet1.xml [sheet2.xml] – etc…
Make your Changes
Browse to xl>workbook.xml and double click on the file. If you are prompted to select an application, always select NOTEPAD – NOT WORDPAD!
If you are unfamiliar with XML, this might look strange. Find the line that looks like:
<workbookprotection workbookalgorithmname="SHA-512" workbookhashvalue="/PqWjbsJjvF9ZfuAX/9rSOHijK4Q==" workbooksaltvalue="BNztIxbaEJpw7IvcclH28g==" workbookspincount="100000" lockstructure="1"> </workbookprotection>
Change lockStructure=”1″ to lockStructure=”0″
Save and Close the XML file you just edited
WinRAR will tell you that “workbook.xml” was modified and ask you to update it in the archive. Select YES.
Browse to xl>worksheets>sheet1.xml(or sheet2, sheet3, etc…) and double click on the file.
Delete the whole line that looks like:
<sheetprotection algorithmname="SHA-512" hashvalue="p10u4BneUg3eT/wBlxTIvojOqTuf18kg==" saltvalue="pOCHLgXP+8NSbHK89LmgGQ==" spincount="100000" sheet="1" objects="1" scenarios="1"> </sheetprotection>
Save and Close the XML file you just edited
When prompted to update the archive with the file you just modified, select YES.
Close out of WinRAR and Open your file.
NOTE: If you are using Excel 2010, the following buttons may need to be clicked on to “unstick” them:
Once unstuck, you should now be able to edit the document as you please.
Alternate Disassembly Instructions – Windows Archive Tool
By default, file extensions are hidden for common document types. You will need to change your folder settings to show file extensions.
Here are some instructions that should cover Windows XP, Vista and Windows 7:
Once you can see the file extension of your Excel Document file, change the file extension from .xlsx, .xlsm to .zip – after the change, you will get a warning that you are changing the extension. Click OK or YES to accept.
Now that your file is in a .zip format, right-click on your file and select Open With>Windows Explorer
Click “Extract all Files”, select your file destination and click “Extract”
Remove Excel File Password Protection
Refer to Step 4 above for changes
Make your changes, save your files and move to the next step
Alternate Instructions for Reassembly
- Select all your files (_rels,docProps,xl,[Content_Types].xml, etc…), right-click and select: Send to>Compressed (zipped) folder. If you create your archive by selecting your main folder and not all of the files, you may run into errors when re-opening.
- Change the file extension of your archive back to the original – .xlsx, .xlsm. When prompted to confirm changing the file extension, select yes.
- You should be able to open your fixed excel file. NOTE: your new filename will be whatever file you right-clicked on to create the archive. Feel free to change it back.
Please comment if you get stuck. Likewise if you have other questions or improvements.
Rafael Santos says
This Works!!!! Thanks!!!!!!!!!!!!!!!
you are awesome! 😀
Adam Pj says
Well done, fantastic article. Worked for me and saved for future reference 🙂
Alex Araujo says
Dear Ryan thanks for this post. Worked fine for me. Best Regards
This is awesome… Works fine, I can’t even believe… Thanks buddy!!! THANK YOU VERY MUCH.
Thank you, Ryan! You saved me a lot of work! Amazing.
That is amazing! Spent ages using Macros to do a brute force attack, but it never worked. Found this solution which is so easy.
Well done good Sir
Thanks a lot!!… very useful article.
tks so much for your post
It worked to unprotect the individual sheets, but the workbook.XML password protection character string was not in the word pad file. The other string was which allowed me to unlock the sheets, but it didn’t unlock the VB side. Is there something I am missing? I looked in all of the other files and didn’t find any other password XML code, but I may just be missing something.
Thank you for your help!
Work like a charm…Thanks!
Amazing, thank you so much. Saved me a ton of time
didn’t worked for me can you help me?
step3…..open archive….but error massage
The archive is either in unknown format or damaged
I confirm that it also works in Excel 2017! Many thank for the post.
They use SHA-512 to encrypt the password, and then it is so easy to unprotect the sheets etc,!
Was scouring through blogs and youtube for hours before I got here. Worked great!! You’re a lifesaver!
This was awesome! Thanks a ton!
So simple and it worked. Thanks!
Thanks . mil gracias funciono
Hi morning, can anyone help me to unlock a file ?? i have forgotten my password i cant recall back .. pls help me .. URGENT !!!
I cant use it for excel 2010 , cant find lockStructure=”1″/>.in the end i got “10000” after that i cant find lockStructure=”1″/> help me please
Thanks! It worked :))))
I V RAMANA MURTHY says
This is NOT working for me. Please suggest any other free method.
Peter S says
I have a workbook with proctection on sheet level and 80 sheets in the book. How to determine the right filename sheetnn.xml of the sheet at which I want to remove the protection? The workbook.xml contains a mapping of sheet name to sheetId. In my case the shhetId of the sheet I am looking for is 128. But the sheetnn.xml file names run from sheet1.xml to sheet80.xml.
Peter S says
I found the answer: workbook.xml does contain the mapping of the sheet name to the number being part of the sheet’s filename sheetnn.xml (or sheetn.xml for numbers up to 9).
Look for something like
and take that value nn.
For example, in my case it is r:id=”rId39″, so sheet39.xml is the sheet’s XML file.
you really help me, thank you very much 🙂
The only way I could unhide a protected worksheet (where I forgot the password….)
Thank you!! It saved me a lot of work.