Free Support Forum -

Fail to unprotect xls

using aspose 18.5 ,the dstFile also has password.
try {
com.aspose.cells.LoadOptions loadOptions = new com.aspose.cells.LoadOptions(FileFormatType.EXCEL_97_TO_2003);
Workbook workbook = new Workbook(srcFilePath, loadOptions);
workbook.unprotect("");, FileFormatType.EXCEL_97_TO_2003);
} catch (Exception e) {
return -1;
} (3.8 KB)


We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42666 - Password not removed from EXCEL_97_TO_2003 file using Unprotect


There is an error in your code. This is not the right way to remove password from the encrypted file. Please change the line of code, i.e.,




Let us know if you still find the issue.

password is removed using workbook.getSettings().setPassword(null);


Good to know that your issue is sorted out by the suggested line of code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.