We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Creating password unprotected XLSX file from a password protected file

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();
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 ???
// ***/
println ( “handleNonPDFPasswordProtectedFile loaded workbook with password " );
contentFileWithPath = contentFileWithPath +”_1.xlsx";
workBookObj.save( contentFileWithPath , com.aspose.cells.FileFormatType.XLSX ) ;



Please use this code creating un-protected Excel file.

try {
    com.aspose.cells.LoadOptions loadOptions = new com.aspose.cells.LoadOptions(FileFormatType.XLSX);
    Workbook workbook = new Workbook("Sprint 4.xlsx", loadOptions);
    workbook.save("Output.xlsx", FileFormatType.XLSX);
} catch (Exception e)

A post was split to a new topic: Create a un-protected file from a password protected MS word file