How to unprotect the excel sheet if forgot the password

New Contributor

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

 

130 Replies

@NikolinoDE 

Hoping you could assist with unlocking password protected document. Receive the following error

jsupplee464_0-1644516960303.png

 

@jsupplee464 

 

After you pasted the vba code in, you need to remove the empty line:

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

            Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)

So it looks like this instead:

.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & _
Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)

You can also find this text under muggisan 's message.

 

Always at your service for further questions :).

 

NikolinoDE

I know I don't know anything (Socrates)

Was the answer useful? Mark them as helpful!

This will help all forum participants.

 

Hi Nikolino, I'm having the same problem. I have like 10 files that are locked with the same password. and i'm not very familiar with VBA. so can I send you my file and see if you can crack my password? plz???

@Eviee1265- Did you ever get a solution as I got a compile error syntax error as well when I ran it

 

I'm having the same issue and I also get an error when trying to run the code.
Are you still open to have files sent to you to unlock it?

Thanks in advance
I need to unlock some cells on a sheet. Can anyone help, I’m not very techy

Hi @NikolinoDE roughly how long could it take to unlock, it's a small spreadsheet and I have a reasonably high spec laptop but just says Excel not responding?

@NikolinoDE 

I'm a noob at this, but when I hit alt F11, double clicked on the worksheet, and pasted your script into it, I got an error.  To fix it, I combined lines 39 and 41.  I deleted the characters "_  " to pull the line together, and it worked.  

When you combine 39 and 41 from Niko's script and delete the random underscore, Line 39 should read ".Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)"

 

When you run the macro you won't get an error and it will display "Finished" when complete.  Close that VBA window and your sheet will no longer be protected.

(I used excel in Microsoft 365)

SOLUTION: I have been trying everything to unprotect a sheet, and I can't believe this worked but it did -> Open google sheets, click import, upload the excel sheet and then download again.

@vedangbapna 

@SPR11X 

@jsupplee464 

@Keith2082 

@BiggyD860 

@QTurtle 
 

 

 

@Deleted 

It is possible to unlock a file with googlsheets, as has already been described.

But files from 2013-2016 (sometimes also 2010, depending on the format) and later this is not possible.

Anyone who promises to open files (from 2013-2016 and after) either has huge resources available or means more of a worksheet.

Many websites promise they can do everything, these sites try brute force software, but in the end it always says that you are sorry and cannot open this file...reasons (excuses) many...so some try internet sites also earn their money.

It is also very often misunderstood, you can unlock a worksheet, a workbook structure, a VBA project, a worksheet range, a cell, a column

...but not a password-locked Excel workbook....am willing to prove me wrong .

 

Thank you for your understanding and patience

 

NikolinoDE

I know I don't know anything (Socrates)

@NikolinoDE Hi, i just pasted in the module and it immediately reports the unprotect line as compile error.

 

error1.JPG

@CarlosUnoDos 

After you pasted the vba code in, you need to remove the empty line:

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

            Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)

So it looks like this instead:

.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & _
Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)

@NikolinoDE 

 

I get a Compile Error Syntax error when trying this....

After reading through this and using the VBA code to no success on a copy of an .xlsx sheet, I was inspired to attempt a combination of other methods found on here (sorry I can't find all of your posts and names to thank)!

 

To describe the scenario, my file had a single visible sheet and restricted selection to a single cell, with multiple output cells (I knew it was referring to a hidden sheet).

 

To start, you of course want to make sure you have a copy of the original sheet (probably in xlsx or xlsm form) and proceed with saving another version of your copy as an xls (a '97-'03 worksheet). You'll want to restart Excel at this point. I then went into the VBA area to analyze the code. In the properties I was then able to disable all restrictions on the Sheet1 and unhide Sheet2. However, I still was unpermitted to edit or see the text in cells, but I noticed the data in the cells showed up in the function bar. (I'm not sure if this is a part of the protection or the ingenuity of myself in the past). I could select each cell individually and copy the data, but I realized I can disable the protection without a password prompt. Doing that allowed me to select all cells and change all text to black and Eureka! Data's all there.

 

Unfortunately, this may not be feasible on files with many sheets, and I have doubts about this working with different file types and other protection methods. Like the others said, please use responsibly! If enough people ask, I'll post the original file (with modifications for confidentiality) and provide working entries to use on the one cell in Sheet1 to show how it works from a user perspective. 

Hi Nico
I posted this in another area of the community, but, as a learner-new-member, I'm not sure if you have seen it there, so I'll say hi here also. Fingers crossed you'll see my post

##I'm getting married in a few weeks time, however, all of my planning data is on a password-protected Excel worksheet, but although I've tried every password i can think of, it won't open.

I have tried as many of the suggested methods in the discussion here to the best of my limited ability , but I'm not an expert, and I just can't get them to work for me

And .. to prove my point, i can't even find the method to attach the Excel file ?
Help ! - you're my only hope at this stage.
I really do hope that you can assist please.

Many thanks in advance##

Kieran

Thank you NikolinoDE, I tried your code but it gave me an error , then I tried the other code and it gave a similar error , I had to remove one comment , then there were several errors which seemd to require to remove some underscores from the code and make two rows longer, also they had variable "l" missing and variable "i" two times. then the code run , it has been a couple of hours , my laptop is a little slow , but is still running the code. meanwhile the xml method worked for me and I managed to remove my password protection ... thank you all .
thanks for your feedback
I wish you continued success with Excel.

yupp I also face same issue sometime, the best way I could say is to find from search engine which will be much helpful I think you can also visit address waiting for your response 

Save the file as an Adobe .PDF, open in acrobat and export to Excel. This creates a copy but you can edit the cells.  @vedangbapna 

I believe some solutions in this discussion are making this much more difficult than it needs to be.

 

Disclaimer: If the author of the workbook is available, please contact that person prior to attempting these steps.  Do not attempt these steps to circumvent security when the author does not want security removed.  Use this solution only if the password is not known and persons who might have it are no longer with your organization.

 

Removing sheet protection from an Excel workbook (.xlsx, .xlsm  - any xml encoded format)

 

1. Close the workbook and make a copy of it

2. Re-name the workbook to change the extension from .xlsx to .zip

3. Double click the .zip to open it in File Explorer

4. Open the 'xl' folder then open the 'worksheets folder'.

5. Locate the protected sheet.  In this view, the sheets have numbers like sheet1.xml, sheet2.xml, etc. (going from left-to-right in the workbook).  Copy the sheet and paste it to another location outside of the zip folder.

6.  Open the Sheet XML file in notepad.

7.  Go to Edit find and locate "protect"

You'll find something like this:

<sheetProtection algorithmName="SHA-512" hashValue="tA2qu3vhTMsDjp5+2E4xAlqXgULwYoz9mj3G0VjCho/IWtTdOEl1aISGihlgjdvOpkJqcH/LCBHFUqI8k9qWHg==" saltValue="oy3jTRSzOLeoACJrs/V+/Q==" spinCount="100000" sheet="1" objects="1" scenarios="1"/>

 

Remove it and nothing more. Notice how the tag begins with "<" and ends with ">".

8. Save and close the XML file.

9. Drag the edited XML file back into the worksheets folder and opt to Replace when prompted.

10. Re-name the .zip back to the format you had it in such as .xlsx.  When the workbook opens you may receive a notice saying Excel found a problem with content in the workbook. Click through the prompts.  Your sheet is unprotected.

11. Enjoy