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

Free Support Forum - aspose.com

Aspose Cells java code to remove password for an Excel ".xlsx" file

I have a “.xlsx” file that is protected by password. I need to remove the password for the file so that next time i double click on the file , it should not prompt me to enter password.
Please provide me sample java code to remove password for an Excel “.xlsx” file


If you need to clear the password for an encrypted file, you may try to use Workbook.getSettings().setPassword(null). See the sample code for your reference. Aspose.Cells will first read the password protected file (using some password) and then clear the encryption to re-save the file:
Sample code:

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

Hope, this helps a bit.