Forum Discussion

BowenR1's avatar
BowenR1
Copper Contributor
Apr 30, 2021
Solved

Help with Protect Sheet

I used Protect Sheet to keep others from changing information on a spreadsheet. Apparently, the last time I updated the information, I entered my password too fast or something, because it is not wor...
  • Rich89's avatar
    May 02, 2021

    As long as you're not talking about cracking an encrypted file, which would be illegal, and only talking about the restrict editing password as you say--then don't worry. Restrict editing passwords are very easy to remove in both Word and Excel.

     

    Here is what you need to do. Make sure that you have enabled seeing file extensions in folders options. Then, change the file extension of the Excel to .zip from .xlsx. Next, open that zip file.

    Where you go from here depends on which restriction you enabled.

     

    If it was for the whole workbook:

    1. Open the workbook.xml file and find the xml node that begins "<workbookProtection" like this.
    2. Highlight from the < character through to the > character following the word "lockStructure" (inclusive) and delete it. That will unlock the workbook.
    3. Replace the xml in the zip with your changed file, and change the .zip back to .xlsx.

    If it is just the sheet:

    1. Look in the xl folder for the sheet.xml file for your sheet.
    2. This time find the node beginning "<sheetProtection" through the > following the word "scenarios". Delete that, and this will unlock the sheet.
    3. Replace the xml in the zip with your changed file, and change the .zip back to .xlsx.

    I've written a PowerShell script that will ask you to point it at a folder and loop through all the Word and Excel files therein, removing the restrict editing passwords to all of them. I can provide this to you if you like. I am unable to sign my scripts though, so I understand if you'd rather not run a strangers code on your machine. That said, I am not malicious, and if you'd like to use it I am willing to provide it to you. Nobody else uses it, and I wrote it just to see if I could while messing around with PowerShell.

Resources