Excel 97/2003: Cannot open excel file encrypted by Aspose.Cells (version 7.2.2)

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,


Please open the generated file into MS Excel (2007/2010), it works fine as I tested. You will be prompted to provide valid password, after providing the valid password, the file opens fine and there is no such issue or error. For your information, we follow MS Excel (97-2010) standards, if MS Excel has any objection or issue in it, we are bound to fix the issue soon.

Thank you.

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,


We still need to evaluate your issue thoroughly, we are not certain if it could be an issue with our product . One thing should be verified first, whether MS Excel 97 supports such kind of encryption by itself or not. One thing you can help us. Please create a an Excel file and set EncryptionType to ENHANCED_CRYPTOGRAPHIC_PROVIDER_V_1 with 128 bits, the file should be created manually in Excel 97, save the file and attach it here. It will help to investigate it further. For your information, if MS Excel 97 does support this feature, we can support it as well.

Thank you.