When you receive an Excel workbook that is password-protected and you do not know the password, it can be frustrating if you need to access or edit the file. While Microsoft Office does not provide an official way to bypass workbook protection without the password, there are several practical methods you can try. These methods range from using VBA code to third-party tools and manual tricks.
In this article, you will learn how to unprotect an Excel workbook without a password using simple and effective approaches. These techniques work on most modern Excel versions, including Excel 2010, 2013, 2016, 2019, and Microsoft Office 365.
Steps to unprotect workbook by saving as xls format:
➤ Open the protected .xlsx file.
➤ Go to File >> Save As.
➤ Choose the .xls format from the file type dropdown and Save the file.
➤ Open the .xls file to check if protection is removed.
What Does "Unprotecting Workbook Without Password"
Mean in Excel?
In Excel, protecting a workbook means restricting users from making structural changes like adding, deleting, or renaming sheets, unless they enter the correct password. When a workbook is protected with a password, only someone who knows that password can unprotect it and make such changes.
Unprotecting a workbook without the password means trying to remove those restrictions even when the original password is unknown or forgotten. This is usually done to regain editing access to a workbook’s structure. It’s important to note that bypassing workbook protection without permission should only be done on files you own or have legal rights to access.
Use VBA Code to Remove Workbook Protection
If you want to unlock a protected workbook without the password, VBA code offers a quick and automated way to try multiple passwords until it finds the right one or removes the protection.
This method works best on older Excel versions and simple password protections. Even if the code does not recover the actual password, it can remove the protection allowing you to edit the workbook.
Steps:
➤ Open the protected workbook.
➤ Press Alt + F11 to open the Visual Basic for Applications (VBA) editor.
➤ In the editor, go to Insert >> Module to add a new module.
➤ Paste the following code into the module window:
Sub UnprotectWorkbook()
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
ActiveWorkbook.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6)
If ActiveWorkbook.ProtectStructure = False Then
MsgBox "Workbook Unprotected!"
Exit Sub
End If
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
MsgBox "Failed to unprotect the workbook."
End Sub
➤ Close the VBA editor and return to Excel.
➤ Press Alt + F8 , select UnprotectWorkbook, and click Run.
If the workbook is not heavily encrypted, the macro will remove the protection.The method might not work for newer versions of Excel. If you have an older version, 2016 or before, this method will work out for you.
Save the Workbook as a ZIP and Edit XML Files
This method works if your Excel workbook is an .xlsx file and the workbook structure is protected via XML. You can unzip the file and manually edit the XML files to remove protection. This does not require any password but works only for structure protection.
Steps:
➤ Make a copy of your protected .xlsx file.
➤ Change the file extension from .xlsx to .zip.
➤ Extract the contents of the ZIP file to a folder.
➤ Open the extracted folder and navigate to the xl folder.
➤ Find and open the file named workbook.xml in a text editor like Notepad++.
➤ Search for the tag <workbookProtection … /> or similar.
➤ Delete the entire <workbookProtection … /> tag.
➤ Save the file and close the text editor.
➤ Compress the folder contents back into a ZIP archive.
➤ Change the file extension from .zip back to .xlsx.
➤ Open the new file in Excel; the workbook should no longer be protected.
Note:
This method is risky. It might not work for everyone, and you can corrupt your Excel file. That is exactly why you should try this method after creating a copy of your workbook, or you might lose your data.
Copy Contents to a New Workbook
If you cannot unprotect the workbook, sometimes copying visible sheets to a new workbook bypasses workbook protection. This works if only the workbook structure is protected, but sheets are editable.
Steps:
➤ Open the protected workbook.
➤ Right-click on each sheet tab, select Move or Copy.
➤ Choose (new book) and check Create a copy.
➤ Click OK to copy the sheet to a new workbook.
➤ Save the new workbook. It will not have the original protection.
Note:
This method does not work if individual sheets are also password protected.
Save Workbook as XLS (Older Format)
Older Excel formats like .xls do not always preserve workbook protection applied in .xlsx files. Saving your file as .xls may remove protection.
Steps:
➤ Open the protected .xlsx file.
➤ Go to File >> Save As.
➤ Choose the .xls format from the file type dropdown.
➤ Save the file.
➤ Open the .xls file to check if protection is removed.
Note:
This method might reduce functionality and formatting since .xls is an older format.
Frequently Asked Questions
Is it legal to unprotect an Excel workbook without the password?
Bypassing workbook protection without permission can violate privacy or intellectual property rights. Use these methods only on files you own or have permission to modify.
Will these methods work on all versions of Excel?
Most methods work on .xlsx files created in Excel 2007 and later. VBA code may have limitations with newer, more secure password encryptions.
Can these methods recover the original password?
VBA and XML editing methods do not reveal the original password but remove protection. Third-party tools may recover the password depending on complexity.
Wrapping Up
In this tutorial, you discovered three effective ways to unprotect an Excel workbook without knowing the password. Whether using VBA code or manual XML editing, each method has its own advantages and limitations. Always make a backup before attempting to unprotect your files. Feel free to try these methods and share your experiences or questions.