How to unprotect the excel sheet if forgot the password

Copper Contributor

Hi team need support to unprotect my sheet which is password protected and forgot the password

 

297 Replies
Hi Niko,

I forget the password for my workbook and trying to open could you please help in removing the password.

Actually you don't need to unprotect the excel file to make a changes or anything. You just need to copy everything and paste into a new worksheet/workbook then you can now edit that worksheet/workbook. @Norman_Harker 

Excellent. Thanks.

@Annie029 

I posted this before and am re-posting because it is super simple and works:

Unzip (decompress) the xlsx file using your unzip program of choice.
Open the workbook and any sheets that are protected in a text editor.

Look for a line in each: <workbookProtection ... /> and comment it out in the respective workbook or sheet.

NappyCoder_0-1642441219099.png

Re-zip (compress) the previously extracted files into a new xlsx file.

Presto! You have an unlocked version of the Excel workbook.

I tried and I can’t turn it into a zip
Won’t let me

Hello @MrsJPT ,

 
Perhaps your file is not an xlsx file. Passwords up to Excel 2007 (xls files) are removed in another way described earlier — using a VBA macros. ...or programs of independent developers ;) (links can be found earlier in the thread)
Can anyone help me with removing the password? Sorry I am not to tech savvy
can i send you my file so you can unlock the pages?
Ok my email
Is

Email address removed

@NappyCoder  Hi, the password was not on the sheets inside the excel.

The password is on the workbook and I am unable to open it. I am not able to open my excel file.

Hey @NikolinoDE , would your code work, if the VBA is protected as well?

It is also possible to unlock a VBA project, but this requires a different procedure and VBA code.
Hi Niko,

Could you please help or advise ow should I unprotect my workbook.

@Annie029,

After you decompress (unzip) the xlsx file, in File Explorer right click on the workbook and select "Edit With" and choose a text editor not Excel to edit the workbook's XML.

 

@NikolinoDE  I can't get mine to work with your supplied code either. There is a syntax error at: 

 

.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & _

 

Do you have any tips?

@bpecquet 

 

Here is a file...with an example.

Standard Disclaimer: The file is for personal use only; any kind of illegal use is the responsibility of the user-executor of this file.

 

Have fun and success with Excel.

 

Info: if someone used it and liked it, please add a like. 

(You find this sign on the bottom left)  Like_pass.JPG

This way it could be seen whether an extension is considered useful by users.

 

 

I am a first time user to this forum. Found it by the grace of God and a little luck when I had forgotten the password to a protected spreadsheet I had made years ago. Based on all of my initial research, I thought for sure I was doomed. Then I found this site, and NikolinoDE's info. I know enough in Excel to be dangerous, but I was having trouble running the code that Nikolino provided above. So, I thought I'd try sending him my spreadsheet and see if he would still be willing to help nearly a year after this string was made. Not only did he respond quickly, but he was kind enough to help remove the password as requested. I don't know Nikolino personally, but he has made my day/week/month a little brighter because he renewed my faith in the human spirit.... to help those in need for no other reason than to make them smile, and bring a light to their otherwise dark situation. Thank you Nikolino, I appreciate your kindness more than you know. May God truly Bless you in all that you do, and may you be an inspiration to others as well.

V/r Shawn

I read through all the answers in this thread and there's 2 solutions present, both of which do now work for me.

The first is to run some VBA code.  This is not possible as when I open my encrypted workbook up, it asks for the password straight away and you cannot click anything in excel except for this password entry box.  So you then enter the wrong password and hit OK, where you are presented with a wrong password message or you hit cancel.  Either way, you're now left on a blank excel screen.  You cannot open Visual Basic editor from here until you create a new sheet or workbook.  Thus you cannot run any VBA code on the workbook you're trying to run code on.

The second option is to unzip the .xlsx file.  After doing this, I am not presented with any worksheets.  I only see a couple files named EncryptionInfo and EncryptedPacakge, along with a folder called (6)Dataspaces.  Inside that folder are more files and folders related to Encryption.  So perhaps old versions of excel simply compressed the worksheets inside a workbook.xlsx file, but that doesn't appear to be the case with Excel 2016 and newer.  It looks like extracting the workbook just extracts more encrypted files.

So theres still no solution for this.  All the talk earlier in this thread is only applying to versions 2012 and earlier or password protected spreadsheets, not encrypted with a password workbooks, which seems to be how it works in 2016 and newer.

@007craft 

Please do not confuse a workbook with a worksheet.

The title of this post is "How to unprotect the excel sheet if forgot the password".

Unlocking a workbook takes a little more than just a little VBA code, Google sheets or a zip trick. This works, if at all, with brute force software and only as long as it is not a large password with letters, numbers and characters.

So even with brute force, the changes in success are very small (if at all). Many websites advertise that everything can open in workbooks, but in my view, they only want to get some money from the users.

Theoretically, a workbook could also be opened with newer Excel versions, but only with a huge expenditure of resources and time, and indeed so much that you will not simply find these solutions in an internet forum.

You can also create your own brute force algorithm and run the file, but this also takes a lot of time... and the success is almost non-existent as already mentioned.

 

Anyway, in this post there are only a few small possibilities and tricks that one could possibly use to open a worksheet... depending on the possibilities of the user, it works or not. I only help where the user gets stuck and if this is possible, the worksheet is unlocked by the user.

 

It's a small humble message that just offers a little help, I don't presume that this small message will or can open anything and everyone in the world of Excel.

For some it helps and for some it doesn't.

 

I wish you continued success with Excel.

 

*It's always good to be aware of when speaking in a public discussion, otherwise it might be rude to the other person. So you can click on my name and you will see who I am...would be happy...

 

Thank you for your understanding and patience

 

NikolinoDE

I know I don't know anything (Socrates)

 

@NikolinoDE 

Hi, I'm sorry to trouble you but my file has an issue and not sure you can help.

I can access the file but some sheets are protected , when I tried applying your method, I couldn't access the VBA section cause it asks for the password, so I cant input your code, is there a solution for this ?

 

thanks for your kind help