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

Free Support Forum - aspose.com

Encrypted xlsx file need to enter password twice

I’ve created a xlsx file with the following lines. But when I open it, it asked for the password twice. The first time it pop up with “Copy of encryptedExcel.xlsx is protected”. The second time without the “Copy” word. Excel file with .xls extension doesn’t have this problem. Any clue?


Workbook workbook = new Workbook();
workbook.getSettings().setPassword(“12345678”);
workbook.setEncryptionOptions(EncryptionType.STRONG_CRYPTOGRAPHIC_PROVIDER,128);
workbook.save(“d:\\encryptedExcel.xlsx”);

Hi,

Thanks for your posting and using Aspose.Cells for Java.

Please download and try the latest version Aspose.Cells for Java (Latest Version). It works fine. I have tested your code and it generated the excel file which prompts for a password for once only.

Java


Workbook workbook = new Workbook();

workbook.getSettings().setPassword(“12345678”);

workbook.setEncryptionOptions(EncryptionType.STRONG_CRYPTOGRAPHIC_PROVIDER,128);

workbook.save(“F:\Shak-Data-RW\Downloads\encryptedExcel.xlsx”);

Thanks for your reply. I’m evaluting Aspose.cell for adding the encryption in our excels generated. I couldn’t find the link you posted but I’ve download the trial version of 7.4.1, 7.4.2 & 7.4.3. All have the same problem. Will it be the problem of evaluation copy?

Hi,

Thanks for your posting and using Aspose.Cells.

Please provide us your input and output files which you are using in your encryption. We will check them at our end. If we find any issue, we will fix it.

Hi Shakeel,


I found the problem now. It’s actually caused by the folder Preview pane in window. As soon as I turned it off, it prompt for one password only. Sorry for bringing this up.

Hi,

It is good to know that you found the source of your problem. If you encounter any other issue, please feel free to post, we will be glad to help you further.