Remove password from Excel files in batch
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:
ExcelClearPass.vbs:
Set objExcel = CreateObject("Excel.Application")
'
objExcel.Visible = TRUE
objExcel.DisplayAlerts = FALSE
'
Path1="D:\VBS\VBS85 Excel Unprotect password\Book1.xlsx"
Path2="D:\VBS\VBS85 Excel Unprotect password\Book2.xlsx"
'
Set objWorkbook = objExcel.Workbooks.Open(Path1,,,," ")
'
objWorkbook.Password = ""
objWorkbook.SaveAs Path2
'
objExcel.Quit