Checking aspose license validity

Hi team,


We are currently developing an application to have excel export feature with Aspose and have procured a license for it.

Using license.setLicense we are able to set the license during our application runtime.

However the method only throws an exception when the file is not present at that location.
If the license key is invalid or the expiration date has passed, no error is indicated and an excel with the evaluation version warning is created.

We would like to detect ,in code, while saving a workbook, whether the workbook was created without the proper license and hence without the evaluation sheet.

Similar question I found
https://forum.aspose.com/t/115972

Thanks,

Hi,


Well, there is no such API to validate if a license is valid or not. You will surely get an exception accordingly for the following conditions.
1) If your license is invalid or you have edited it or modified its signatures in the file.
2) If your license is expired and you are using any version of the product which is released after your subscription expiry date.


If there is no error and you got an evaluation water mark sheet, it means your license code is not processed at all.

Thank you.

Hi Amjad,

I have checked both cases

modifying a character in the signature,

modifying the expiration date (changing it to a past date)

In both cases no exception was thrown and a sheet was generated with tthe evaluation warning sheet

Hi,


After further evaluation of your scenario/case, I observed the issue as you mentioned. I found no exception is thrown if the license file is updated (a bit) for the following fields:
“” and “” etc.
The output file does have Evaluation Warning sheet but I think It should give some sort of exception accordingly or provide an API to validate the license. I have logged a ticket with an id “CELLSNET-42457” for your issue. We will look into it soon.

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

Thank you.

Thanks Amjad

Hi,

Thanks for using Aspose.Cells.

It’s our implementation mode that we do not throw any exception and just
simply return if the unmodified license is changed.