Reg Issue in Using Working.Settings.Password with ASPOSE EXCEL

Hi Team ,

In our application we are using aspose to read and manipulate excel feels .

We are trying to check if a workbook/worksheet has a password by using the below :

If oBook.Settings.Password Is Nothing Then

//Do Nothing

End If

However we noticed that even with an excel sheet which is protected and has a password ,

the above check returns nothing . COuld you please let us know the actual functionality of this ASPOSE property ??

Also if there is any other ASPOSE option to check if the workbook/worksheet has a password or not ?

Regards,

Prem V Varghese

EMAIL : premv.v@tcs.com

CONTACT : +91 - 9895625835

Hi Prem,

Thanks for your posting and using Aspose.Cells.

If the workbook is protected with password, then you cannot load it inside the workbook object without providing the password. You will have to load it using the following code.

e.g

C#


LoadOptions opts = new LoadOptions();

opts.Password = “1234”;


Workbook workbook = new Workbook(“source.xlsx”, opts);



Once, you will have loaded it successfully, then Workbook.Settings.Password will contain a password.

Prem V V:

Also if there is any other ASPOSE option to check if the workbook/worksheet has a password or not ?



You can also detect if the file is encrypted with password or not without loading it actually. Please see this article for your reference.


Hi Team,

Thanks for the response .

Reg using the Fileformat Info Static Class for checking if the excel has encryption or not ?

I am not able to use it . I suspect if its part of the Aspose.cells namespace i am using .
I am attaching a screenshot of the message i am getting .

Could you please confirm what the issue is ??

Hi Prem,

Thank you for writing back.

Please note that FileFormatInfo class is present in Aspose.Cells namespace. You can opt to use the fully qualified name as “Aspose.Cells.FileFormatInfo”. In case you still couldn’t find the said class, this could be due to the reason that you are using any older version of the API, in which FileFormatInfo class hasn’t been added yet. In this case, we would suggest you to upgrade the API to later version.

Please feel free to write back in case you need our further assistance with Aspose.Cells API.

Hi,


Which version of the product you are using, please try our latest version/fix : Aspose.Cells for .NET v7.7.1.4 which does have the relevant APIs.

Let us know if you still find the issue.

Thank you.

Hi team,

Attaching the screenshot with the version details

Hi Team ,

In the downloaded package of latest aspose.cells , i couldnt find a .lic file which ideally i refer in the solution where aspose.cells is used .

Cos i am not able to build the same application with the new version of aspose.cells

Hi,


Well, as you are using .NET framework client profile version of the product in your project, so you might not use the latest version/fix: v7.7.1.4 for which I shared the link in my previous reply as this fix is compiled for normal .NET framework versions >= 2.0.

If you need .NET framework client profile version, kindly try to download our latest version (v7.7.1) from the Downloads module and get the required version from “\bin” folder at your installation directory:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry519229.aspx

Also, we do not ship any license for you with the fix archive. You may try the latest version v7.7.1 with your existing license. If your license is expired (you may open your license into notepad and check the subscription expiry date) to use the latest versions, I am afraid, you have to upgrade your subscription to use latest versions of the product, you may contact Sales in Aspose.Purchase forums.

Thank you.