Hack into a protected Excel 2007 or 2010 Workbook

September 26th, 2011 by datapig Leave a reply »

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.

4. See this link to hack into a protected worksheet.



  1. Venus says:

    Same problem as Saul and Damodar, using 7ZIP.

    I have used your method before, and it works like a charm, but I think this file has some serious encryption going on.

    I’m entering my financial data but it has to be on their “form”. (And all because they don’t want me clicking on cells outside the work area, sheesh!)

  2. shanfmid says:

    Hi, I tried to download the xml file, when I run need the administrator password. Is there any way to solve this problem please? With thanks,

  3. killer says:

    im unable proceed from step 3 im stuck at step 4… pls help me out

  4. bestcushyone says:

    I have a 2010 protected workbook that I cannot open to change the extension. Is there any help for me? I have tried all of the freeware I have found.


  5. Jeff says:

    Extracting the .zip file doesn’t work. Even with 7zip I get 3 files (no directories): [5]DocumentSummaryInformation, [5]SummaryInformation, and Workbook. I attempt to open Workbook with the XML software but I only get a mass amount of errors and warnings with very little readable code which didn’t contain anything described as to what you’re meant to look for

  6. clark vera says:

    This works on xlsm files as well. It can be done by using 7zip to directly extract the xlsm file into another folder, which produces the worksheets. Then go to each work search and edit, removeing the Element. Then re-open with 7zip and copy the modified contents from the worksheets folder into the worksheets folder of the 7zip open file. BINGO.

  7. Omar says:

    This method doesnt work for 2007 protected workbook. If the excel file is password protected as a whole (meaning as soon as I try to open the file it prompts password), any other methods you are aware of that I can remove it or crack it?? Stupid me forgot the password :( Thanks in advance for any help you can provide.

  8. Zingo says:

    If i keep password to Open file, after converting to zip it gets corrupt (unable to extract), any help

  9. smithjeary says:

    Through Microsoft excel file unlocker software you can unlock Excel file password. I have also used this software when I forgotten Excel workbook password then this software helped me to recover my original Excel file.


  10. plzz help me i forget my excel password

  11. Stef says:

    Nice, thanks!

  12. Avvy says:

    I tried this method, and it does not work. changing the file ext to zip rar or 7zip gives the same result. This is not a valid zip file.

    So I am stuck with a major financial document that needs to be cracked as I forgot the password of the entire document.

    Argh pulling hair from my head.

  13. Joe G says:

    Seems they have caught up with this now in Excel 2010 – I cannot save the file with zip extension – it automatically reverts to .zip.xlsm so the file extension is always xlsm whatever you try.
    Unless I am doing something wrong?

  14. Punzola says:

    Worked like a charm! I had to look for and change/delete the line in the work sheet 1 . xml

  15. Gary says:

    Joe G — instead of *saving* the file as .zip from Excel, *rename* it in Windows Explorer from .xlsx to .zip.

  16. robert says:

    I believe I’ve used this method before but it doesn’t seem to work anymore at least with excel 2013. After renaming to .zip, when I open it in 7zip I only see DataSpaces folder, and two files EncryptionInfo and EnycrptedPackage

  17. Craig says:

    Thanks, that worked!!! (Using Excel 2010)

  18. Alberto says:

    Awesome! It works even with sheet protection*: I tried on a Excel 2013 xslx file with 13 locked sheets and it worked PERFECTLY! Thank you very much!

    *you have to dig into the folder structure and find the sheet.xml files

  19. hansolo says:

    When I open the workbook.xml file in XML Marker there is no “workbookProtection” line. I’ve successfully gone into each worksheet and deleted this line, but not seeing it at the workbook level. Help? I’m working with a .xlsm file in which someone wants to hide their back-end VBA efforts if that makes any difference.

  20. Michael says:

    Just open the excel file with 7zip or winrar. With this method you don’t need to change the extension.

    good luck

  21. Steve says:

    In the HTM file I do not see
    I see WorkbookPR and bookviews but not the protection
    Any suggestions

  22. Debbie says:

    Please note that if your spreadsheet has multiple tabs that have been individually protected you will need to take out the protection for each tab too. These will normally be called workbook.xml.

  23. Senthil kumar says:

    the procedure works for the worksheets, but not for the VBA modules. have anything for that

  24. Shahzad says:

    not working……

  25. morenaz says:

    Done it. Worked. Thanks. Easy

  26. Avatar says:

    Works great and easy. Excel 2010.

  27. noname says:

    changed file extension to zip but when trying to extract gives error: “The archive is either in unknown format or damaged” This is with std winzip & winrar. I am trying to open an Excel 2010 .xlsx file. Any help with this error?

  28. noname says:

    So ive read this forum http://datapigtechnologies.com/blog/?p=959 and the comment:
    “datapig, July 10, 2013 at 2:24 pm
    Will: Looks like your workbook has Workbook structure protection on it; not sheet level protection. You can’t use this technique on your particular workbook.”

    Thing is I got this working when protecting the Structure only but when I protect the file so that you need a password to open it, I cant extract the zip file.

    Any help is appreciated…

  29. Paul says:

    Thank you, worked using Excel 2010 =)

  30. Michael says:

    thanks! works like charm.

  31. Karl says:

    For anyone struggling with this, the following worked for me (I had the 3 files using 7zip as mentioned above, and couldn’t open with winrar or winzip)

    Open file within Open Office Calc
    Save as Open Office document

    It will ask for password – click retype, you will then have the option of removing the password, select this.

    Close document down, and open new Open Office Version, save again as an excel file

    Open in excel, remove protection.

    Took less than 5 minutes

  32. Cameron says:

    I was able to get this to work by deleting the protection line in the sheet xml not the workbook xml

  33. Zuber says:

    I used your method and it worked. Did not have a XML editor at work so used a notepad.

    Thanks a lot!

  34. Stevie Howard says:

    It works when I copy the xml file out of the zip without unzipping, edit, save and copy back in and then rename


  35. Paul says:

    Windows may not let you change the extension from .xlsx to .zip from the desktop the easy way. What worked for me was going into command prompt, navigating over to the file location, then issuing following command:

    ren filename.xlsx filename.zip

  36. Jayr Gallego says:

    Can I ask for a help ?

    may I have a link of the 7zip that you’ve used ? please. :( where to download it?

    I already have 7zip, but I found out that there is no XML files within the directories.. only [6]DataSpaces, EncryptionInfo, EncryptionPackages… :( please help me.

  37. Peter M says:

    Have extracted the file, modified as described (deleted workbookProtection), saved, opened to check changes, zipped up, changed extension. I can open the XLSX file, but when I try to unprotect, it ask a password.

    Doing this on Excel 2010.

    It’s easy enough to follow the instructions, but I’m afraid it does not work like this.

    It’s a pain, because a former employee here programmed a few nice spreadsheets, which he password protected…

  38. Mohan says:

    It’s not possible this tip to contain VBA passwords. Mention other types tips or I will upload the file then unlock me and mail me if possible. Thank you

  39. Jinnendra says:

    It works like a dream, thanks for the awesome solution, but I am not sure why unprotecting excel has this much difficulty, is there any other easy way to do so. because all the time may not be able to install xml editor. because i got xml editor 30 days trail version, after 30 days it wont allow me to install again. so, is there any other work around for this.


  40. nasiru says:

    pls its not working for me ,,after i changed file extension to zip ,,i m getting error when i open it ..pls anyone for help me ,,i will pay for service ,,pls email me ..nasirutambali (at) gmail.com

  41. joo says:

    this doesnt work to xls file formats
    if you cannot extract/open your zip file you first need to convert yout xls file to xlsx visa some online converting service.
    after that it works like a charm!

  42. PizzaGuy says:

    I know Microsoft upped their security in Excel 2013 by using a SaltValue. This apparently protects against a brute force attack.
    My question is, is this protection still intact if you change the file to XLSB format. If so, would this be an ideal file format to secure documents since you wouldn’t be able to access the file’s XML either?

  43. R.Adler says:

    I did work perfectly with 2010

  44. Ivica says:

    Crack Sheet Protection Password
    This routine provides a password to unprotect your worksheet. However, it may not give you the original password that was used.

    Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window:

    Sub PasswordBreaker()
    ‘Author unknown but submitted by brettdj of http://www.experts-exchange.com

    Dim i As Integer, j As Integer, k As Integer
    Dim l As Integer, m As Integer, n As Integer
    Dim i1 As Integer, i2 As Integer, i3 As Integer
    Dim i4 As Integer, i5 As Integer, i6 As Integer
    On Error Resume Next
    For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
    For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
    For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
    For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

    ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
    Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
    Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    If ActiveSheet.ProtectContents = False Then
    MsgBox “One usable password is ” & Chr(i) & Chr(j) & _
    Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
    Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    Range(“a1″).FormulaR1C1 = Chr(i) & Chr(j) & _
    Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
    Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
    Exit Sub
    End If
    Next: Next: Next: Next: Next: Next
    Next: Next: Next: Next: Next: Next

    End Sub

    Close the VB Editor window. Navigate to the worksheet you want to unprotect. Hit Tools-Macro-Macros and double-click PasswordBreaker in the list.

  45. Rob says:

    It is not possible to change the file extension of a pw protected Excel 2010 file. This hack does not work.

  46. kuldokk says:

    I tried this but somehow it did not work. I read through the comment section and there are people who want to be able to view the VBA code of an VBA project-protected xlsm file. So here is how you do it:

  47. Captain says:

    I have tried the 7zip and rar method. When I rename my file from xlsx to zip, it turns the file into an empty directory. Is there something I am doing wrong?

  48. caruncles says:

    It didn’t work on a .xls file trying to open with Excel 2007. When I saved as an .xlsx file it didn’t work either. Both ways it tells me the zip file is empty.
    I did not “save as” to make the zip. I just renamed it in file explorer.

  49. caruncles says:

    passwordbreaker didn’t work because it wouldn’t let me insert a module.

Leave a Reply

Powered by sweet Captcha