Remove VBA project password from XLS file (Excel 2003 and older):
- Open xls file with a hex editor
- Search for DPB and replace with DPx
- Save file.
- Open file in Excel.
- Click "Yes" if you get any message box.
- Set new password from VBA Project Properties.
- Close and open again file, then type your new password to unprotect.
For Excel 2010 (Works for MS Office Pro Plus 2010 [14.0.6023.1000 64bit]),
- Open the XLSX file with 7zip
If workbook is protected:
- Browse the folder
xl
- If the workbook is protected, right click
workbook.xml
and select Edit - Find the portion
<workbookProtection workbookPassword="XXXX" lockStructure="1"/>
(XXXX
is your encrypted password) - Remove
XXXX
part. (ie. <workbookProtection workbookPassword="" lockStructure="1"/>
) - Save the file.
- When 7zip asks you to update the archive, say Yes.
- Close 7zip and re-open your XLSX.
- Click Protect Workbook on Review tab.
- Optional: Save your file.
If worksheets are protected:
- Browse to
xl/worksheets/
folder. - Right click the
Sheet1.xml
, sheet2.xml
, etc and select Edit. - Find the portion
<sheetProtection password="XXXX" sheet="1" objects="1" scenarios="1" />
- Remove the encrypted password (ie.
<sheetProtection password="" sheet="1" objects="1" scenarios="1" />
) - Save the file.
- When 7zip asks you to update the archive, say Yes.
- Close 7zip and re-open your XLSX.
- Click Unprotect Sheet on Review tab.
- Optional: Save your file.