Is Aspose.Cells supporting password protected document of version "Microsoft Excel 5.0/7.0"

Hi Aspose Team,

I am trying to open excel workbook created in the Microsoft office 5.0/7.0 but it is throwing an error of “Invalid Data!”. Normal document of without password is working as expected. Following is the ref ticket which I think might be relevant.

Is this module supporting this version of file? The behavior is fine but can you provide a valid error message stating that it is a password protected doc and it is not supported? Is there any plan to add support it in near future?

Thanks.

@harshshah903,

Could you zip your template encrypted (password protected) MS Excel 5.0/7.0 file and attach it here, we will check your issue soon.

Also, share the password to open the file in MS Excel.

@Amjad_Sahi,

The sample files of this kind can be created using MS Office 2007.

I have attached two sample file whose password is 123456. I have enabled protect sheet mode option which can be found on the review tab in the top ribbon.It will not prompt the user for the password when document is opened. The other one will not allow editing without un-protecting.

I am using following code to open the document

            Aspose.Cells.LoadOptions loadOpts = new Aspose.Cells.LoadOptions();
            loadOpts.Password = "123456";
            LoadFilter lf = new LoadFilter();
            lf.LoadDataFilterOptions = LoadDataFilterOptions.All;                
            loadOpts.LoadFilter = lf;
            workbook = new Workbook(fileName, loadOpts);

Let me know if you need anything else.

I can not see if the files are uploaded correctly, have you received it?

@harshshah903,

Please zip the files and upload the zipped archive using Upload button while replying in the reply frame. See the screenshot for your reference.
sc_shot1.png (7.2 KB)

Hi Team,

I am again attaching the “Password-123456-95-Excel.zip”.

Thanks.

Have your received the file?

I am looking for the earliest resolution.

@harshshah903,

I still could not see your attachment(s) with your posts in this thread. Please do attach your template file and confirm us.

PFA,

Password-123456-95-Excel.zip (11.0 KB)

Thanks.

@harshshah903,

Thanks for the files.

I found an exception (““Invalid Data”) when trying to read the older XLS files (Microsoft Excel 5.0 / 95 Workbook) via the line of code:
e.g.
Sample code:

Workbook workbook = new Workbook("e:\\test2\\Password-123456-95-Excel.xls");
//Workbook workbook = new Workbook("e:\\test2\\Password-(123456)-95-Excel.xls");

Please note, the files are not encrypted at all rather in one file, only the worksheet is password protected. Protected sheets are different thing when comparing with encrypted files, see the documents in the section for your reference. To confirm this, we can use the following sample code which works fine and as expected:
e.g.
Sample code:

 FileFormatInfo fft = FileFormatUtil.DetectFileFormat("e:\\test2\\Password-(123456)-95-Excel.xls");
            bool check = fft.IsEncrypted;//false - Ok

It seems your file is not read by Aspose.Cells APIs fine and Aspose.Cells takes these files as Unknown load format or file format type, so it gives the “Invalid Data” error. I have logged a ticket with an id “CELLSNET-47702” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

Thanks for the response, I do have fully password protected documents, I am looking for a way to re-create the sample document which can produce this problem, however if you have any idea on how this can be diagnosed ? please let me know.

Really appreciate it.

@harshshah903,

You meant encrypted (XLS) Excel files in older format? yes, you may share with us for evaluation as we have already logged a ticket for it so we can add your resource files with the ticket. Please also, spare us little time to evaluate your logged issue (logged as “CELLSNET-47702”).

Once we have any new information to share with, we will update you.

@harshshah903,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@harshshah903,

Please try our latest version/fix: Aspose.Cells for .NET v20.10.8 (attached)
Aspose.Cells20.10.8 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.10.8 For .Net4.0.Zip (5.4 MB)

Your issue should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-47702) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao

Thanks team.

@harshshah903,
You are welcome.