I’m back from the Power Analyst Bootcamp in Washington DC – and of course, it was a success. 37 of the finest analysts attended the 2-day event, where we shared our passion for Excel, deli meats, and spicy tricks and tips. In the end, everyone left with a bag full of new techniques that will make them better analysts.
.
While I was gone, there seems to have been a flurry of activity and questions in reference to hacking into a protected workbook. A couple of years ago, I posted a slick technique you can use to hack into a protected 2007 worksheet. Apparently, hacking in a protected workbook is also a highly desired talent. So today, I’ll walk through the steps to hack into a protected workbook.
.
Excel 2007 and 2010 files are essentially zipped packages that contain XML files. This means that if you take an xlsx file and change the extension to zip, you’ll be able to see all the xml documents that make up your Excel file. Not only that – you can change the content and properties of an Excel 2007 file simply by manipulating the XML documents that make it up.
.
That’s right. You can remove workbook protection simply by applying a simple edit to the xml within the Excel file.
.
When you encounter a protected workbook, it’s typically locked down so that you can’t change the structure of the workbook. This means you can’t unhide sheets, delete tabs, add sheets, or change the workbook structure in any way.

.
So let’s start hacking.
.
Step 1: Make a backup of your file in case things take a turn for the worse.
Step 2: Change the file extension to zip.

.
Step 3: Extract the contents of the zip file.
Step 4: Go to the extracted files and navigate to the xml for the target sheet (found in the ‘xl\worksheets’ directory)

.
Step 5: Open the target sheet’s xml document using an XML editor (I use a free editor called XML Marker)
Step 6: Find the ‘workbookProtection’ tag and remove the entire line.

.
Step 7: Save the edited xml document and replace the old xml document found in the original zip file.
Step 8: Change the extension back to xlsx.

.
At this point, your workbook is unprotected!
.
.
A couple of notes:
1. Any password you see in the XML file is not the real password, nor will it work if you try to use it. It’s worthless.
2. It seems as though this will only work on workbooks that have been protected for structure only. If the workbook has been protected for structure and ‘Windows’, something prevents you from even opening the Open XML package.
3. You obviously cannot do this for Excel 2003 or any kind of xls files.


This sounds like it could be useful for me. I work with a lot of trolls that like to protect workbooks and then hide sheets in order to hide their shoddy analysis. Now I can open those hidden tabs and see what they’ve done.
All the more reason not to use crappy Microsoft Office.
Other office software, such as LibreOffice, actually encrypts the data stored within its file when there’s a password set.
So they completely screwed up all the automation that worked perfectly in 2003 on the grounds of “security” and caused about a billion professionals to tear their hair out but left the file structure wide open! Although to be strictly fair you can break the passwords in Office with a bent paperclip anyway so anyone with anything that needs to be kept secure shouldn’t be usng it – fine for keeping your Christmas card list or recipe collection not so good for banking. My concern is that because it is so flexible and ubiquitous folk embed Office products into other systems without realising the gaping holes they are leaving in security and integrity.
You are able to do this in a protected Microsoft word by searching for “Protect” and deleting the line out of the xml file.
As for the Excel 2003 files being unable to remove the password it is possible if you save the file in a xlsx or xlsm format follow the steps you provided and then save back in xls format.
Worksheet protection is not a security feature, so you should not be surprised that’s its easy to brake. its meant to be like that.
when working with the xml bit i am using an xml editor called liquid xml (http://www.liquid-technologies.com/xml-editor.aspx), better than messing around with excel!
i didnt find the WprkbookProtection key word in the xml file. where n how to get it? help.
I run office 2007 SP2 MSO and this doesn’t work.
The unzipped folder contains “[6]Data Spaces” (a folder) and “EncryptedPackage” and “EncryptionInfo” (to files without extension).
Inside the folder, more files without extension.
Not working with microsoft strong encrypted protection…. when we zip it shows a damage file always… does anyone can help to find out the solutions without any software??
Exactly same problem i have faced as vijay says, when try to open the zip file it says that either file damaged or corrupted…….does anyone help to get solved this ???
Even i am facing the same issue please help me solve this :’(
i cannot open the .zip file. it says “the archive is in an unknown format or damaged”. any help?
i used WinRAR and windows explorer but i cannot open
Ken: Try using winzip or the built in windows zip.