TOP

Removing the password in Excel

YouLibreCalc for Excel logo

Description

If you don't know how to remove the password protection of the Excel file, you can choose one of the three options below to do it quickly and easily.


1. We use a program to remove passwords

Google and download the program "Office Password Recovery Toolbox" , which selects passwords for encrypted Microsoft Office documents: Word, Excel, Outlook, Access databases and VBA projects.

Please note that the received passwords will not be native, but will only be a randomly selected combination of characters (these are the features of the password encoding mechanism in Excel).

2. Remove passwords using the code VBA

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

Sub PasswordRemover()
    'moonexcel.com.ua
    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 SheetPassword 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
    
            SheetPassword = 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 SheetPassword
            
            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 

After executing this macro, passwords will be permanently deleted from the Excel file.

3. Deleting a password using XML (for advanced users)

Quick steps to crack the password in Excel by changing the internal code in the file:

Detailed explanation:

  1. The new xml file is a container.
  2. You can open it with an app TotalCommander - place it on the cursor and press Ctrl + PageDown
  3. So on the way "File.xlsx/xl/worksheets/sheet1.xml" or "sheet2" or something else is this password protected sheet. For example, located in "sheet1" .
  4. Extract the file "sheet1.xml" from the XLSX container and open in a text editor.
  5. Search for "pass".
  6. The editor will find the XML container:
    <sheetProtection password="CF7A" sheet="1" objects="1" scenarios="1" selectLockedCells="1" selectUnlockedCells="1"/> 
    Or something like that. In short, the container " sheetProtection ".
  7. Delete entire container " sheetProtection " from "<" to ">" .
  8. Save the file.
  9. Return this file to the XLSX container.
  10. Exit the XLSX file.
  11. Open the file by double clicking and voila!!! Everything works!!!

P.S.

If you know the password, but tab "Remove sheet protection" ("Unprotect sheet") inactive, you should select "Editing" ("Edit"), press the button "Access to the book" ("Access to workbook") , then uncheck it "Allow multiple users to edit a file" ("Allow multiple users to edit file") .