Remove password from Excel files in batch

Posted on


I am going to get batches of 200+ Excel files with a blank password, one just needs to press enter when asked for the password. The system I am loading these files into cannot handle password protected Excel sheets. Is there a command line or other solution where I can just open those Excel sheets with the known blank password and then re-save them without a password?

This password is to open the file.

I followed the recommendation in STTR’s answer and used DocRecrypt. I am no longer prompted for a password for these files when opening them. Awesome.


Test DocRecrypt.

Microsoft Office 2013 DocRecrypt Tool

To remove the password from a file, use this code:

DocRecrypt –i lockedfile 

To remove the password and assign a new password of 12345, use this code:

DocRecrypt –p 12345 –i lockedfile 

To remove the password, create a new file, and assign a new password of 12345 to that file, use this code:

DocRecrypt –p 12345 –i lockedfile -o newfile 

way 2:


Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = TRUE 
objExcel.DisplayAlerts = FALSE
Path1="D:VBSVBS85 Excel Unprotect passwordBook1.xlsx"
Path2="D:VBSVBS85 Excel Unprotect passwordBook2.xlsx"
Set objWorkbook = objExcel.Workbooks.Open(Path1,,,," ")
objWorkbook.Password = ""
objWorkbook.SaveAs Path2