Forum Discussion
How to unprotect Excel sheet if forgot the password
I recently encountered a problem and hope to get your help. I set a protection password for an Excel file before. Now I want to modify some data, but I found that I forgot Excel password. I wonder if there is any way to remove the protection or unprotect Excel sheet password? If anyone knows a related solution or has had a similar experience, please share it, thank you very much!
This file is very important to me, and there is a lot of work data in it. I have tried some methods found on the Internet, but none of them worked. It would be great if someone could provide some specific steps or recommend some tools.
66 Replies
- ChikstewCopper ContributorUsing VBA code to unprotect Excel sheet password is essentially a hack. It's like using a skeleton key to break into a safe. If you're working on sensitive data or files, you might want to think twice about using this method, as it could compromise the security of your work.
- TommieCorwinbeCopper Contributor
I have also been in a situation where I forgot Excel password of an Excel file. At that time, I used a simple VBA script to try to unprotect Excel worksheet. The basic steps are as follows:
- Open the Excel file: First, open the file you need to unlock.
- Launch the VBA Editor: Press Alt + F11 keys in Excel, which will open the VBA Editor.
- Insert a new module: In the VBA Editor, right-click on "VBAProject" on the left, select "Insert", and then select "Module".
- Copy and paste the code: Paste a VBA code for cracking the password in the new module. This code will try various password combinations until it finds the correct password.
5. This code will try some simple passwords (such as "1234", "password", "0000") and tell you which one is the correct password. Of course, you may need to try more combinations in actual use.
6. Run the script: In the VBA editor, press F5 to run the script. If the password is simple, this method may successfully unlock it.
This method is more suitable for situations where the password is not particularly complex. If the password is very complex, it may take more time or a more complex script to try. I hope this simplified method can help you!
- TommieCorwinbeCopper Contributor
Using VBA to try to unprotect Excel sheet without password is a more technical method, but if you are willing to try some programming, it is definitely a direction to explore. I once encountered the problem of forgetting the password of an Excel file, and a piece of VBA code helped me solve this trouble.
It is actually not that complicated to operate. You just need to open the Excel file with password protection and press Alt + F11 to enter the VBA editor. Here, you can insert a new module and paste a piece of code to crack the password. There are many such sample codes on the Internet, but the basic idea is to try multiple combinations until you find the correct password.
Here is a simple VBA code example to try to unlock Excel worksheet:
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: For n = 32 To 126 ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & _ Chr(i1) & Chr(i2) & Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If ActiveSheet.ProtectContents = False Then MsgBox "One usable password is " & Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) Exit Sub End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next End Sub
This code will try various password combinations and if it finds the right password it will display it. Of course, this method may take some time, especially if the password is complex.
- Crickettpurple23Copper Contributor
- pravin2201Copper ContributorThanks a ton. It worked like a charm.
- ToddSumrallIron Contributor
RuthDelbert For Excel 2007 and later versions, files are saved in an XML-based format. This means you can unzip the file and manually edit the XML files to remove the protection. This method requires some technical knowledge and careful handling of XML files.
How to unprotect Excel sheet without password by editing the internal xml file:
- Change the file extension of the Excel workbook from .xlsx to .zip.
- Extract the contents of the ZIP file to a folder.
- Navigate to the folder and open the xl subfolder.
- Locate the worksheets subfolder and find the XML file corresponding to the protected sheet (e.g., sheet1.xml).
- Open the XML file in a text editor (e.g., Notepad++).
- Search for the tag <sheetProtection> and delete it along with its attributes.
- Save the XML file and close the text editor.
- Compress the folder back into a ZIP file.
- Change the file extension from .zip back to .xlsx.
- Open the modified Excel file, and the sheet should be unprotected.
- rhinotek1Copper Contributor
Thank you for the steps. This had worked for me before but if renaming the file from .XLSX to .ZIP gives you an error (unsupported format), rename it to .ARJ, and the same can be done using the BBEdit app. Simply open the ARJ file with BBEdit and follow the rest of the steps.
- rhinotek1Copper Contributor
Thank you EnricoPenco! I had posted a similar solution where I mentioned to change the file extension to ARJ. But after reading your post, the same can be done with the standard XLSX extension. So, let me reiterate myself:
THIS IS EXCEL FOR MAC OS USERS.
- Download a FREE copy of BBEdit
- Make a copy of your password protected file: Select it, press CMD-C then CMD-V.
- Right-Click on the new file and select "Open With" then "Other..."
- On the pop-up window, next to "Enable:", change "Recommended" to "All Applications".
- Make sure NOT TO ENABLE "Always Open With".
- Select "BBEdit.app" your list of Applications.
- BBEdit will show a series of locations on the left pane. Expand "xl", and within it expand "worksheets".
- Select the "sheet" with the password.
- You can use the function to Find (CMD-F) to easily locate "<sheetProtection"
- Delete this tag from "<sheetProtection" to its tag closure "/>"
- Save the file and open it to make sure password is gone.
- god_akshayCopper Contributorvery nice and simple execution, no external software nothing pure action! thanks buddy!
- raikanedCopper Contributor
not working, it produce an error insteadToddSumrall
- rhinotek1Copper Contributor
If Unsupported Format error see my solution above.
- LindaHamiltonIron Contributor
I actually ran into the same issue before. I ended up using a tool called Dr--Excel, and it worked like a charm. It took me just over 20 minutes to recover my 7-digit password, and I was back into my file without any issues.
I followed this step-by-step guide:
https://www.makeuserof.com/unprotect-excel-sheet
The interface is straightforward, and it’s easy to use. If you’re stuck like I was, I’d definitely recommend giving Dr--Excel a try.
- cpisaniCopper Contributor
Is this a safe product? Will the contents of my spreadsheet be shared or saved anywhere else but on my laptop?
- rhinotek1Copper Contributor
This may be a scam but the manual steps are easy to follow and work on any device/OS
- Michael_FayCopper Contributor
Norton blocked the URL as malicious.
- BethWhislerCopper Contributor
There are several online services that offer password recovery tools for Excel. These tools can quickly unprotect excel sheet without password. Be cautious when using online services and ensure they are reputable to avoid data breaches or malware.
Search for a reliable online Excel password recovery tool. Upload the protected Excel file to the service. Follow the instructions provided by the service to remove or recover the password. Download the unprotected file once the process is complete.