Hello Support Team,
I am using below code and seeing that the password is still sticking with the newer XLSX file which I created from source password protected file.Sprint 4.zip (12.4 KB)
Password for the XLsX file inside the zip file is sdra
////-------------------------
loadOptionObj = new com.aspose.cells.LoadOptions();
loadOptionObj.setPassword(passwordKey);
println ( “handleNonPDFPasswordProtectedFile passwordKey was: " + passwordKey );
contentFileWithPath = attachmentObject.getFileEx(null, attachmentObject.getContentType(), 0, false);
println ( “handleNonPDFPasswordProtectedFile contentFileWithPath was: \n " + contentFileWithPath );
workBookObj = new com.aspose.cells.Workbook(contentFileWithPath, loadOptionObj) ;
//--------------- Does not work ???
workBookObj.unprotect(””);
// ***/
println ( “handleNonPDFPasswordProtectedFile loaded workbook with password " );
contentFileWithPath = contentFileWithPath +”_1.xlsx";
workBookObj.save( contentFileWithPath , com.aspose.cells.FileFormatType.XLSX ) ;
////------------------------