How to Remove Password Protection from an Excel File: A Practical Guide

    Suppose your colleague just sent you an important Excel file, but it’s password protected and he can’t remember the password. Or maybe you’ve been working with an urgent spreadsheet for the past few weeks, but now you can’t remember where you put the password.

These situations are more familiar than you think, and they can cause serious delays and headaches. A password protected Excel document can be like a vault – except that you’re locked out and unable to access the information you need to perform your duties.

Password protection is a useful tool in Excel, but it can also come with unwanted consequences. If you’ve lost or forgotten your password, you may feel like you’ll never regain access to your valuable data again. Fortunately, you can retrieve your lost password without becoming an IT professional.


Practical Methods to Remove Password Protection

There are a few different ways you can remove password protection from Excel files, each method tackles a different kind of password protection, so choose the method that best suits your needs.

In this article I’ll explain several different techniques so you can assess which is more appropriate for you.

Excel Password Image


What is protected Excel file?

Excel has multiple types of protection, each one of them protects your work in a different way:

  1. Worksheet Protection: Limits user ability to modify worksheet contents.
  2. Workbook Protection: Protects workbook structure, such as inserting, deleting or renaming worksheets.
  3. File Encryption: Protects the whole file by encrypting it, so a password is needed in order to open the workbook.


Removing Excel Worksheet and Workbook Protection

Method 1: Using VBA Macro (Visual Basic for Applications)

VBA macros are one of the easiest ways to unprotect worksheets and workbooks. This technique works for Excel 2010 to 2019 and Office 365.

  1. Open the Excel File: Launch Excel and then open your protected file.
  2. Open VBA Editor: Press Alt + F11 to launch the VBA Editor.
  3. Insert a Module: From the menu in the VBA Editor, select Insert > Module.
  4. Enter the Macro Code: Copy and paste the following VBA code into the module:
  5. Sub PasswordBreaker()
        ' Breaks worksheet password protection.
        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
    
        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
            ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6)
            If ActiveSheet.ProtectContents = False Then
                MsgBox "Password is " & Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6)
                Exit Sub
            End If
        Next: Next: Next: Next: Next: Next
        Next: Next: Next: Next: Next: Next
    End Sub
    

  6. Run the Macro: Press F5 or navigate to Run > Run Sub/UserForm to run the macro. The script will try to guess the sheet lock and attempt to unlock the sheet by trying different combinations of characters.


Method 2: Using Excel Password Remover Tools

There are some useful tools can help you remove the protection from Excel files easily. Just choose a suitable one according to your need.

  1. PassFab for Excel: With its high success rate, it helps to remove password effectively.
  2. Stellar Phoenix Excel Password Recovery: Supports various attack types for recovery process, including brute-force attack and dictionary attack.
  3. iSumsoft Excel Password Refixer: Helps remove excel worksheet protection and workbook protection nicely.



Steps to Use a Password Remover Tool:

  1. Download and Install the Tool: Download the tool from the official website. Then, install it on your computer.
  2. Open the Software and Open the File: Open the software of Excel password remover and open the protected Excel file.
  3. Choose Recovery Method: You need to select the protection type that you want to remove.
  4. Start the Process: Click start button to remove the password and wait for the tool to process.


 

Remove Encrypted File

Encrypted file is a little bit different, because the whole workbook is encrypted. Here is the way you can try to Decrypt the File

Method: Hex Editor (Advanced)

If you are technically advanced enough, you can use hex editor to edit the Excel binary code. This way is complicated, and easily lead to the corruption of the file.

  1. Make a Backup: Make a backup of the file first.
  2. Open the File in a Hex Editor: Open the Excel file using a hex editor like HxD or Hex Workshop.
  3. Find the Password Hash: Search the file for the location where the password hash is located. You will need to know the file structure of an Excel file for this.
  4. Modify or Remove the Hash: Modify the hash value or remove it carefully.
  5. Save and Open the File: Save the file and try opening it using Excel.


 

Older Excel Versions

Excel 2003 and older employ even weaker encryption which can be easily removed.

Option 1: File Extension Change

1.     Extension Change: Rename your Excel file from .xls to .zip.

2.    Unzip: Unpack the zip file.

3.    Find XML: Identify the workbook.xml or sheet.xml file and open it.

4.    Delete Protection Tags: Open the XML in a text editor and remove any protection tags, like <workbookProtection /> or <sheetProtection />.

5.    Rezip: Save the XML, zip the files, and change the extension back to .xls.


How to avoid password protection removal in future?

If you don’t want to unprotect Excel file password in painful way, you should learn some tips as below:

  • Password Management Tools: LastPass, 1Password or Dashlane etc. They can safely manage passwords.
  • Keep Record: Keep a secure record of passwords in a safe place.
  • Built-in Recovery Options: Excel has some built-in options for recovering file if you forgot password, like hint prompt.

Conclusion

In conclusion, Removing password protection from a excel file is not a complicated job. There are many practical methods are available from Beginner Level to Advanced Level, the thing is you have to find the solution that fits your problem.

Please remember that you should use this method ethically and legally. So now you know these methods and you can use preventive measures to protect your excel files so you won’t be locked out of your important excel data ever again.

What is your thought, Let me know in the comment box


Q1: What if I forgot the Password?

If you forgotten your excel file password than you use above mentioned methods like VBA Macro, Password recovery tools or Hex Editor process. But make sure you have right to access the file.

Q2: Can you explain more about XML files in Excel?

XML (eXtensible Markup Language) files in Excel organizes and transports data within workbook. For example, in .xlsx file, Excel uses multiple XML files as following:

workbook.xml: Describe the workbook structure, includes sheets.

sheetN.xml: Per worksheet, contains data.

styles.xml: Formatting and styles.

sharedStrings.xml: Text strings to save storage space.

Post a Comment

Previous Post Next Post