SOLVED

Help with Protect Sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-2311555%22%20slang%3D%22en-US%22%3EHelp%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2311555%22%20slang%3D%22en-US%22%3E%3CP%3EI%20used%20Protect%20Sheet%20to%20keep%20others%20from%20changing%20information%20on%20a%20spreadsheet.%20Apparently%2C%20the%20last%20time%20I%20updated%20the%20information%2C%20I%20entered%20my%20password%20too%20fast%20or%20something%2C%20because%20it%20is%20not%20working.%20I%20don't%20know%20how%20I%20could%20enter%20the%20same%20wrong%20password%20twice%2C%20but%20the%20password%20I%20usually%20use%20for%20this%20spreadsheet%20is%20not%20working.%20I%20tried%20different%20variations%20but%20nothing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20want%20to%20have%20to%20completely%20recreate%20the%20spreadsheet.%20I%20tried%20making%20a%20copy%20of%20it%2C%20but%20that%20didn't%20work.%20I%20tried%20saving%20an%20unprotected%20copy%2C%20but%20that%20didn't%20work%20either.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20for%20me%20to%20get%20a%20workable%20copy%20of%20this%20spreadsheet%20without%20starting%20over%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2311555%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315033%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315033%22%20slang%3D%22en-US%22%3EAs%20long%20as%20you're%20not%20talking%20about%20cracking%20an%20encrypted%20file%2C%20which%20would%20be%20illegal%2C%20and%20only%20talking%20about%20the%20restrict%20editing%20password%20as%20you%20say--then%20don't%20worry.%20Restrict%20editing%20passwords%20are%20very%20easy%20to%20remove%20in%20both%20Word%20and%20Excel.%3CBR%20%2F%3E%3CBR%20%2F%3EHere%20is%20what%20you%20need%20to%20do.%20Make%20sure%20that%20you%20have%20enabled%20seeing%20file%20extensions%20in%20folders%20options.%20Then%2C%20change%20the%20file%20extension%20of%20the%20Excel%20to%20.zip%20from%20.xlsx.%20Next%2C%20open%20that%20zip%20file.%3CBR%20%2F%3E%3CBR%20%2F%3EWhere%20you%20go%20from%20here%20depends%20on%20which%20restriction%20you%20enabled.%20If%20it%20was%20for%20the%20whole%20workbook%3A%3CBR%20%2F%3EOpen%20the%20workbook.xml%20file%20and%20find%20the%20xml%20node%20that%20begins%20%22%3CWORKBOOKPROTECTION%3E%20character%20following%20the%20word%20%22lockStructure%22%20(inclusive)%20and%20delete%20it.%20That%20will%20unlock%20the%20workbook.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20it%20is%20just%20the%20sheet%3A%3CBR%20%2F%3Elook%20in%20the%20xl%20folder%20for%20the%20sheet.xml%20file%20for%20your%20sheet.%20This%20time%20find%20the%20node%20beginning%20%22%3CSHEETPROTECTION%3E%20following%20the%20word%20%22scenarios%22.%20delete%20that%2C%20and%20this%20will%20unlock%20the%20sheet.%3CBR%20%2F%3E%3CBR%20%2F%3EI've%20written%20a%20PowerShell%20script%20that%20will%20ask%20you%20to%20point%20it%20at%20a%20folder%20and%20loop%20through%20all%20the%20Word%20and%20Excel%20files%20therein%2C%20removing%20the%20restrict%20editing%20passwords%20to%20all%20of%20them.%20I%20can%20provide%20this%20to%20you%20if%20you%20like.%20I%20am%20unable%20to%20sign%20my%20scripts%20though%2C%20so%20I%20understand%20if%20you'd%20rather%20not%20run%20a%20strangers%20code%20on%20your%20machine.%20That%20said%2C%20I%20am%20not%20malicious%2C%20and%20if%20you'd%20like%20to%20use%20it%20I%20am%20willing%20to%20provide%20it%20to%20you.%20Nobody%20else%20uses%20it%2C%20and%20I%20wrote%20it%20just%20to%20see%20if%20I%20could%20while%20messing%20around%20with%20PowerShell.%3C%2FSHEETPROTECTION%3E%3C%2FWORKBOOKPROTECTION%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315188%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315188%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1038301%22%20target%3D%22_blank%22%3E%40Rich89%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo...it%20is%20not%20for%20a%20malicious%20purpose.%20I'm%20just%20trying%20to%20save%20myself%20the%20time%20and%20headache%20of%20recreating%20the%20spreadsheet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20made%20it%20this%20far...Look%20in%20the%20xl%20folder%20for%20the%20sheet.xml%20file%20for%20your%20sheet.%20This%20time%20find%20the%20node%20beginning%20%22%3CSHEETPROTECTION%3E%20following%20the%20word%20%22scenarios%22.%20Delete%20that%2C%20and%20this%20will%20unlock%20the%20sheet.%3C%2FSHEETPROTECTION%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20really%20good%20with%20computer%20speak%20and%20don't%20know%20a%20lot%20about%20excel.%20I%20only%20protected%20the%20worksheet%2C%20so%20I%20opened%20the%20xl%20file.%20There%20isn't%20a%20%22sheet.xml%22%20file%2C%20but%20there%20is%20a%20%22workbook.xml%22%20file.%20Where%20would%20I%20find%20the%20node%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20currently%20attempting%20to%20do%20this.%20I'm%20hoping%20you%20are%20still%20online.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315209%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315209%22%20slang%3D%22en-US%22%3EThe%20workbook%20one%20you%20only%20need%20if%20you%20protected%20the%20whole%20workbook.%20If%20it%20was%20the%20sheet%2C%20then%20after%20you%20open%20the%20zip%2C%20there%E2%80%99s%20a%20folder%20called%20xl%2C%20and%20inside%20that%20somewhere%20is%20the%20sheet%20xml%20file%20that%20you%20need.%20One%20sec%20i%20can%20post%20a%20picture%20if%20that%20would%20be%20helpful.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315215%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315215%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1038301%22%20target%3D%22_blank%22%3E%40Rich89%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20what%20is%20inside%20xl%20file...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315216%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315216%22%20slang%3D%22en-US%22%3E%3CP%3EAlrighty.%26nbsp%3B%20I've%20attached%20some%20images%20here%20to%20assist%20you%20in%20the%20order%20that%20you%20need%20to%20do%20them.%26nbsp%3B%20These%20images%20are%20assuming%20you%20have%20restricted%20the%20sheet%20and%20not%20the%20whole%20book.%20When%20you%20look%20in%20the%20worksheets%20folder%2C%20you'll%20see%20however%20many%20sheet.xml%20files%20there%20are%20as%20you%20have%20in%20your%20workbook.%26nbsp%3B%20Just%20be%20sure%20to%20choose%20the%20correct%20one.%26nbsp%3B%20They%20don't%20correspond%20by%20name%2C%20only%20by%20order%20across%20the%20bottom%20of%20your%20Excel%20view.%26nbsp%3B%20Okay%3F%26nbsp%3B%20So%2C%20for%20example%2C%20if%20the%20sheet%20you%20restricted%20is%20the%203rd%20tab%2C%20you%20want%20sheet3.xml.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20you%20do%20is%20drag%20the%20xml%20file%20to%20your%20desktop%2C%20open%20it%20with%20notepad%2C%20delete%20that%20highlighted%20bit%20I'm%20showing%20in%20the%20one%20image%2C%20save%2C%20then%20drag%20back%20into%20the%20original%20location%2C%20overwriting%20the%20original.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20close%20out%20of%20the%20zip%20and%20rename%20it%20back%20to%20.xlsx%20file%20extension.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1041994%22%20target%3D%22_blank%22%3E%40BowenR1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315218%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Protect%20Sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315218%22%20slang%3D%22en-US%22%3EI%20found%20the%20sheet%20and%20%22%3CSHEETPROTECTION%20algorithmname%3D%22...%26quot%3B%2C%22%20but%3D%22%22%20there%3D%22%22%20is%3D%22%22%20no%3D%22%22%3E%3C%2FSHEETPROTECTION%3E%3CBR%20%2F%3ENow%20what%3F%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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 working. I don't know how I could enter the same wrong password twice, but the password I usually use for this spreadsheet is not working. I tried different variations but nothing.

 

I don't want to have to completely recreate the spreadsheet. I tried making a copy of it, but that didn't work. I tried saving an unprotected copy, but that didn't work either. 

 

Is there a way for me to get a workable copy of this spreadsheet without starting over?

13 Replies
best response confirmed by BowenR1 (Occasional Contributor)
Solution

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.

@Rich89 

 

No...it is not for a malicious purpose. I'm just trying to save myself the time and headache of recreating the spreadsheet.

 

I have made it this far...Look in the xl folder for the sheet.xml file for your sheet. This time find the node beginning "<sheetProtection" through the > following the word "scenarios". Delete that, and this will unlock the sheet.

 

I'm not really good with computer speak and don't know a lot about excel. I only protected the worksheet, so I opened the xl file. There isn't a "sheet.xml" file, but there is a "workbook.xml" file. Where would I find the node? 

 

I am currently attempting to do this. I'm hoping you are still online.

 

Thank you!

The workbook one you only need if you protected the whole workbook. If it was the sheet, then after you open the zip, there’s a folder called xl, and inside that somewhere is the sheet xml file that you need. One sec i can post a picture if that would be helpful.

@Rich89 

This is what is inside xl file...

Alrighty.  I've attached some images here to assist you in the order that you need to do them.  These images are assuming you have restricted the sheet and not the whole book. When you look in the worksheets folder, you'll see however many sheet.xml files there are as you have in your workbook.  Just be sure to choose the correct one.  They don't correspond by name, only by order across the bottom of your Excel view.  Okay?  So, for example, if the sheet you restricted is the 3rd tab, you want sheet3.xml.

 

What you do is drag the xml file to your desktop, open it with notepad, delete that highlighted bit I'm showing in the one image, save, then drag back into the original location, overwriting the original.

 

Then close out of the zip and rename it back to .xlsx file extension. @BowenR1 

I found the sheet and "<sheetProtection algorithmName=...", but there is no "scenarios".

Now what?
This is what I found...

etProtection algorithmName="SHA-512" hashValue="0y8I1nW5880WNsyH+bqK5hWSNfLCcBWxl0st+jw//y64jBxqNUdGncS7QZTwR/DnqwcGjOqpmRLIWtDp5AUxHw==" saltValue="+j12ZWsg7o3dKbkM1nHCgQ==" spinCount="100000" sheet="1" selectLockedCells="1" selectUnlockedCells="1"/>

Okay. Make a copy of your Excel before you make any changes. Then delete all of:
<sheetProtection algorithmName="SHA-512" hashValue="0y8I1nW5880WNsyH+bqK5hWSNfLCcBWxl0st+jw//y64jBxqNUdGncS7QZTwR/DnqwcGjOqpmRLIWtDp5AUxHw==" saltValue="+j12ZWsg7o3dKbkM1nHCgQ==" spinCount="100000" sheet="1" selectLockedCells="1" selectUnlockedCells="1"/>

That should do it. I think this scenario might be slightly different from what I described because of what specifically was locked. But just delete that bit and try it.

IT WORKED!!!!!!

Thank you sooooo much!!!!!

I appreciate it more than you will ever now!

Enjoy the rest of your Sunday!
I'm very happy to help! And you've helped me as well. I've learned there are exception to how the xml node reads and that gives me a project to do on my script because my script would not have worked here.

Have a great day.
Oh, and don't forget to mark your thread as solved. That way in the future if someone comes looking they can find your solution.
LOL...how?
There should be an option under the posts to "mark as best response" I believe. Pretty sure that's what does it. I don't think it really matters which one you choose in this case since it was just you and I responding to each other.