If you are stuck with an Excel file that is password protected and you don’t know the password then this article will be beneficial to you. The objective of this article is to explain how to decrypt Excel file without a password.
Download Practice Workbook
You can download the practice workbook from here.
2 Easy Ways to Decrypt Excel File Without Password
Here, I have taken the following Excel sheet as my dataset. It contains a sales overview.
If I try to edit something in this Excel sheet it shows a Warning Box like the one you are seeing in the following image.
To check if the Excel sheet is protected, go to the Review tab from Ribbon. Then in the Protect group, you will see that the sheet is protected.
If you click on Unprotect Sheet you will see the following dialog box will appear. You will need to insert a password here to decrypt the Excel file. In this article, I will show you how you can decrypt Excel file without password in 2 different ways.
1. Use ZIP Extension to Decrypt Excel File Without Password
For this method, I have taken the following Excel sheet which is password protected. I will show you how you can decrypt Excel file without password by using the ZIP extension.
Let’s see the steps.
- In the following image, you can see that the file extension is not showing.
- To make the file extension visible, go to the View tab.
- After that, check the File name extensions option.
- Next, change the file extension to zip.
- Then, press Enter.
- Consequently, a warning box will appear asking if you are sure about it.
- Next, select Yes.
- After that, you will see that you have changed the file extension.
- Next, select the file.
- Then, right-click on it.
- Further, select Extract to Decrypting Excel File.
- Afterward, a new folder will be created.
- Open that folder.
- After that, open the folder named xl.
- Then, open the folder named worksheets.
- Here, you will see all the worksheets of that Excel file. I want to remove protection from sheet3.
- Next, select sheet3.
- Then, right-click on sheet3.
- Select Open with.
- After that, select WordPad.
- Next, in that document find the highlighted part in the following image.
- Then. delete this part.
- Afterward, press Ctrl + S from your keyboard to save it.
- Now, go back and select the following folders and files.
- Afterward, right-click on those selected files.
- Select Send to.
- Then, select the Compressed (zipped) folder.
- After that, name the file as you want.
- Now, you will see that you have got your zipped file.
- Next, change the extension of the file to xlsm.
- Then, press Enter.
- Consequently, a warning box will appear.
- Select Yes.
- Finally, you will get your desired Excel file.
- After that, open that file to check if the file is decrypted.
- In the following picture, you can see that you have decrypted the Excel file without a password.
2. Employ Macros to Decrypt Excel File Without Password
Here, I will show you how you can employ Macros to decrypt Excel file without password. For this section, I have taken the following dataset. This sheet is protected with a password. Now, I will decrypt it without a password.
Let me show you how you can do that.
- Firstly, go to the Developer tab.
- Secondly, select Visual Basic.
- Thirdly, the Visual Basic editor window will open.
- Select Insert tab.
- Then, select Module.
- Consequently, a Module will open.
- After that, write the following code in that selected Module.
Sub Decrypt_File() Dim p As Integer, q As Integer, r As Integer Dim a As Integer, b As Integer, c As Integer Dim p1 As Integer, p2 As Integer, p3 As Integer Dim p4 As Integer, p5 As Integer, p6 As Integer On Error Resume Next For p = 65 To 66: For q = 65 To 66: For r = 65 To 66 For a = 65 To 66: For b = 65 To 66: For p1 = 65 To 66 For p2 = 65 To 66: For p3 = 65 To 66: For p4 = 65 To 66 For p5 = 65 To 66: For p6 = 65 To 66: For c = 32 To 126 ActiveSheet.Unprotect Chr(p) & Chr(q) & Chr(r) & Chr(a) & Chr(b) _ & Chr(p1) & Chr(p2) & Chr(p3) & Chr(p4) & Chr(p5) & Chr(p6) & Chr(c) If ActiveSheet.ProtectContents = False Then MsgBox "Done!" Exit Sub End If Next: Next: Next: Next: Next: Next: Next: Next: Next: Next: Next: Next: End Sub
🔎 How Does the Code Work?
- Here, I created a Sub Procedure named Decrypt_File.
- Then, I declared 12 variables as Integer.
- Next, I used 12 For Next loop to go through the characters.
- Afterward, I used ActiveSheet.Unprotect method to remove the protection from the active sheet.
- Then, I used the Chr function to get the characters equivalent to the ASCII code.
- Next, I used ActiveSheet.ProtectContents property to check if the worksheet is still protected or not. If it is False then a message box will appear showing “Done!”.
- Further, I used Exit Sub to exit the Sub Procedure.
- Then, I ended the IF Statement.
- Finally, I ended the Sub procedure.
- Next, Save the code and go back to your worksheet.
- Afterward, go to the Developer tab again.
- Then, select Macros.
- Consequently, the Macro dialog box will appear.
- Then, select Decrypt_File as the Macro name.
- Next, select Run.
- After a while, a message box will appear.
- Then, select OK.
- Finally, the protection will be removed from the Excel sheet.
- To check that, I will try editing the sheet.
- First, select the range where you want to add Fill Color.
- Then, go to the Home tab.
- After that, click on the drop-down option for Fill Color.
- Then, select the color you want.
- Finally, you can see that a Fill Color is added to the selected range. That means you have decrypted the file without a password.
How to Decrypt Excel File with Password
In this section, I will show you how you can decrypt Excel file with password and then remove the password protection from the file. Let’s see how you can do that.
- To begin with, you will see a dialog box appear when you open the file.
- Then, write the password in the dialog box.
- After that, press OK.
- Consequently, your Excel file will be decrypted.
- Next, go to the File tab.
- Afterward, select Info.
- Next, click on the drop-down menu for Protect Workbook.
- Then, select Encrypt with Password.
- After that, a dialog box will appear.
- Clear the password from here.
- Then, select OK.
- Finally, you will see that you have removed the protection from the Excel file.
Read More: How to Remove Encryption from Excel (2 Methods)
💬Things to Remember
- You have to remember that Method 2 is time-consuming. If you want to remove protection from multiple sheets then you will have to run the code from each sheet individually. And, it takes time to run the code.
Here, I have provided a practice sheet for you to practice how to decrypt Excel file with password.
So, you have reached the end of my article. Here, I tried to explain how to decrypt Excel file without password in 2 different ways. I hope this article was clear to you. For more articles stay connected with ExcelDemy. If you have any questions, feel free to let me know in the comment section below.