Complete tutorial:
The following is a method for removing passwords when viewing the content of a file in an Excel worksheet.
I. Method for Removing Password from a Single Worksheet:
Change the file extension from .xlsx to .rar, then open the file. Click into the xl folder, then into the worksheets folder. Drag the .xml file to the desktop, open it with Notepad, and delete everything from '<sheetProtection' to the right of the closing angle bracket '>'. Save the file, drag it back into the .rar file to replace the original, and change the extension back to .xlsx.
II. Removing Password from the Entire File:
Remove password from Excel workbook and all worksheets:
Sub RemovePassword()
Dim sheet As Worksheet
For Each sheet In Worksheets
sheet.Protect AllowFiltering:=True
sheet.Unprotect
Next
ActiveWorkbook.Sheets.Copy
For Each sh In ActiveWorkbook.Sheets
sh.Visible = True
Next
End Sub
III. Method for Removing Restriction Password in Word:
The method for removing restriction passwords in Word is similar to removing passwords from a single Excel sheet. Change the .docx file extension to .rar, open it, drag the settings.xml file from the word folder, remove everything from '<w:documentProtection' to the next '>' symbol, drag the file back, and change the extension back to .docx.
Comments