Forgetting the password to a protected Excel sheet or workbook can be a significant obstacle when you need to access or modify important data. Luckily, there are several methods to regain access without the password. This guide provides detailed steps to help you unprotect your Excel files.
Using Google Sheets
Step 1: Log in to your Google Drive account. Click on the New button located at the top-left corner of the page.
Step 2: From the dropdown menu, hover over Google Sheets and select Blank spreadsheet.
Step 3: In the new spreadsheet, click on File in the toolbar and choose Import from the dropdown menu.
Step 4: In the Import file dialog box, navigate to the Upload tab. Click on Select a file from your device to browse your computer.
Step 5: Locate the protected Excel file on your device, select it, and click Open. Alternatively, you can drag and drop the file into the Import file box.
Step 6: When prompted, choose the Replace spreadsheet option and click on Import data.
Step 7: The protected Excel worksheet will now open in Google Sheets. You'll notice that the protection has been removed, allowing you to edit the data freely.
Step 8: To save the unprotected file back to Excel format, click on File, select Download, and choose Microsoft Excel (.xlsx).
Step 9: Choose a location on your device to save the file, give it a new name if desired, and click Save.
You now have an unprotected Excel sheet that you can edit and save as needed.
Using VBA Code to Unprotect Sheet
Step 1: Open the Excel file containing the protected sheet you wish to unprotect.
Step 2: Press Alt + F11
on your keyboard to open the Visual Basic for Applications (VBA) editor.
Step 3: In the VBA editor, locate the left pane labeled Project-VBAProject. Expand the Microsoft Excel Objects folder, right-click on the protected sheet, select Insert, and then choose Module.
Step 4: In the new Module window that appears, paste the following VBA code:
Sub PasswordBreaker()
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
Step 5: Press F5
or click on the Run button in the toolbar to execute the code. The macro will attempt to unprotect the sheet. This process may take some time depending on your system.
Once the macro has finished running, your sheet should be unprotected and editable.
Using Zip File Format Trick for Sheet
Step 1: Navigate to the Control Panel on your computer and select File Explorer Options.
Step 2: In the File Explorer Options window, click on the View tab. Uncheck the box labeled Hide extensions for known file types. Click Apply, then OK to save the changes.
Step 3: Locate your protected Excel file in File Explorer. Right-click on the file and select Rename. Change the file extension from .xlsx
to .zip
and press Enter. Confirm the change if prompted.
Step 4: Open the renamed zip file. Navigate to the xl
folder to access the workbook's contents.
Step 5: Inside the xl
folder, open the worksheets
directory. You'll see a list of XML files representing each sheet in the workbook.
Step 6: Identify the XML file corresponding to the protected sheet. Right-click on this file, hover over Open with, and select Notepad.
Step 7: In Notepad, press CTRL + F
to open the Find dialog box. Search for the tag <sheetProtection
. Delete this entire tag from the XML file.
Step 8: Save the changes by pressing CTRL + S
and close Notepad.
Step 9: Repackage the files into a zip archive. Select all the extracted files and folders, right-click, and choose Send to > Compressed (zipped) folder.
Step 10: Rename the new zip file, changing the extension from .zip
back to .xlsx
. Confirm the change if prompted.
You can now open the Excel file, and the previously protected sheet will be unprotected and editable.
If You Know the Password
Step 1: Open your Excel file by double-clicking on it.
Step 2: Click on the Review tab located in the Excel ribbon at the top of the window.
Step 3: If you want to unprotect a sheet, click on Unprotect Sheet in the Changes group. A dialog box will appear prompting you to enter the password.
Step 4: Enter the password in the dialog box and click OK.
Step 5: To unprotect a workbook, click on Unprotect Workbook in the same Review tab. Enter the password when prompted and click OK.
Your Excel sheet or workbook is now unprotected and ready for editing.
Unprotect Excel Workbook Without Password
Using VBA Code to Unprotect Workbook
Step 1: Open the Excel file with the protected workbook structure.
Step 2: Go to the Developer tab in the Excel ribbon. If the Developer tab is not visible, you can enable it through Excel Options.
Step 3: Click on Visual Basic to open the VBA editor.
Step 4: In the VBA editor, click on Insert and select Module from the dropdown menu.
Step 5: Paste the following code into the module window:
Sub Shareus()
ActiveWorkbook.Sheets.Copy
For Each sh In ActiveWorkbook.Sheets
sh.Visible = True
Next
End Sub
Step 6: Press F5
or click on the Run button to execute the macro.
Step 7: A new workbook will open without the workbook structure protection. You can now save this workbook and edit it as needed.
Using Zip File Format Trick for Workbook
Step 1: Locate the protected Excel file. Make a backup copy of the file to prevent data loss.
Step 2: Rename the original file, changing the extension from .xlsx
to .zip
. Confirm the change if prompted.
Step 3: Extract the contents of the zip file to a new folder. You can use any file extraction tool for this step.
Step 4: Navigate to the xl
folder within the extracted files. Locate the file named workbook.xml
.
Step 5: Right-click on workbook.xml
and select Open with > Notepad.
Step 6: In Notepad, press CTRL + F
to open the Find dialog box. Search for the tag <workbookProtection
. Delete this entire tag from the XML file.
Step 7: Save the changes and close Notepad.
Step 8: Re-compress the extracted files back into a zip archive. Ensure that the folder structure remains the same.
Step 9: Rename the zip file, changing the extension back to .xlsx
. Confirm the change if prompted.
Step 10: Open the Excel file. The workbook structure protection should now be removed, allowing you full access.
By following these methods, you can unprotect Excel sheets or workbooks, even without remembering the original password. Always remember to keep backups of your files before attempting these steps, and consider using a secure password manager to store your passwords safely.
Member discussion