Hi,
i am trying to use Aspose.Cells (java) to create encrypted excel files by the following
lines of code:
---------------------------------------------------------------------------------------
workbook.getSettings().setPassword(“password”);
workbook.setEncryptionOptions(EncryptionType.ENHANCED_CRYPTOGRAPHIC_PROVIDER_V_1, 128);
workbook.save(“test_encrypted.xls”, FileFormatType.EXCEL_97_TO_2003);
---------------------------------------------------------------------------------------
Due to requirement to support old excel 1997, but the generated file can’t be open by the excel viewer even i input the correct password.
an error message shown: “The password you supplied is not correct. verify that the CAPS LOCK key is off and be sure to use the correct capitalization.” .
My old program (powerbuilder + excel OLE) can encrypt excel file properly, which
can be opened by excel 1997, code i used in powerbuilder belowed:
---------------------------------------------------------------------------------------
OleObject objExcel
objExcel = create oleobject
objExcel.ConnectToNewObject(“Excel.Application”)
objExcel.workbooks.Open(“excel_to_encrypted.xls”)
objExcel.Application.DisplayAlerts = "False"
objExcel.ActiveWorkbook.SetPasswordEncryptionOptions(“Microsoft Enhanced Cryptographic Provider v1.0”, “RC4”, 128, true)
objExcel.ActiveWorkbook.SaveAs (“encrypted_excel.xls”, 43, “password”)
---------------------------------------------------------------------------------------
Anybody know the solution? (i am required to use enhanced encryption method)
Thank you.
Ah Ping.
Hi,
Thanks for your posting and using Aspose.Cells for Java.
Please download the attached file and try to open it in your Excel Viewer, let us know if it opens fine or shows the same problem.
I have generated the attached file using the latest version:
Aspose.Cells for Java 7.3.0
with the following code.
Java
Workbook workbook = new Workbook();
workbook.getSettings().setPassword(“password”);
workbook.setEncryptionOptions(EncryptionType.ENHANCED_CRYPTOGRAPHIC_PROVIDER_V_1, 128);
workbook.save(“test_encrypted.xls”, FileFormatType.EXCEL_97_TO_2003);
Hi mshakeel.faiz,
The same error message shown.
Thank you for your fast response.
Thx.
Ah Ping
Hi,
Hi Amjad,
yes, the file can be opened in excel 2007/2010, but, the problem is that
=> file can’t be opend in excel 97!!!
you can download the excel viewer here: http://microsoft-excel-viewer.software.informer.com/8.0/
and try to open the file…you will get the error!!!
that’s why i suspect the excel generated and encrypted by aspose.cell is not
compatible as it claims (FileFormatType.EXCEL_97_TO_2003)
Thank you.
Ah Ping
Hi,
Thanks for your feedback.
We have logged this issue in our database. We will look into it and if possible we will fix it.
Once, the fix is available or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40266.
Hi mshakeel.faiz,
i have checked the versions of excel that can open the encrypted excel, created by
Aspose.Cells,
Result:
excel 97: Fail(error message as previously mentioned)
excel 2000: Fail (dito)
excel XP: OK
excel 2003: OK
excel 2007: OK
excel 2010: OK.
Will there be any update to, at least confirm this is a bug (not related to user’s PC/excel configuration or misuse of the API)?
Btw, my company have brought a developer OEM license which include a ‘free support’…and it mentions (link):
“Note that we only develop hotfixes for the current version of the
software and that if you do not have a subscription you are not entitled
to software updates.”
“You get free support without a subscription but not software updates.”
Then do it means i won’t get the software update/hotfix, if any, even it is released??
Thank you.
Ah Ping
Hi,
Thanks for your feedback.
I am afraid, at the moment, we have no update for you, but we have logged your comments and we will let you know if it is a bug and fixable.
Regarding your subscription, you are entitled to have new releases for 1 year starting from the date of purchase of your license.
Suppose if you have purchased a license on 30-July-2012, then you can freely use new releases till 30-July-2013, after that you will have to renew your subscription.
You can check your License Subscription Expiry Date by opening your license in a notepad.
Hi,