Removing password protection in Excel

Download file Download file

Case 1. (Using of a program)

In attached file is program which shows passwords for all worksheets of the workbook in Microsoft Excel.

Case 2. (Using VBA)

Open menu Service - Macros - Visual Basic Editor (or press Alt+F11), insert new module (menu Insert - Module) and copy there this code:

Sub Password_Cracker()

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
Dim kennwort as string
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

Kennwort = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
ActiveSheet.Unprotect Kennwort
If ActiveSheet.ProtectContents = False Then
MsgBox "Done" & vbcr & "enjoy it )"
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next

End Sub 

Case 3. (For advanced user)

Save as - XML.
Further open by Notepad.
Find tag Password.
Delete its away.
Open Excel - voila!

New office file is container.
You can open its by TotalCommander - put it on cursor and press Ctrl + PageDown
So in path "File.xlsx/xl/worksheets/sheet1.xml" or "sheet2" or something else is that one password-protected sheet. For instance, is in "sheet1".
1. Extract file "sheet1.xml" from container XLSX and open by text editor.
2. Search for word "pass".
3. Editor will find XML-container . Or something like that. Briefly, container "sheetProtection".
4. Delete all container "sheetProtection" from "<" till ">".
5. Save file.
6. Put this file back to container XLSX.
7. Rise up from file.
8. Open file by double-clicking and voila!!! Everything works!!!


If we now password but the tab "Unprotect sheet" inactive, you should choose "Editing", button "Access to workbook", then remove tick "Allow multiple users to edit file ".