License

License class

Provides methods to license the component.

Constructors

NameDescription
LicenseInitializes a new instance of this class.

Methods

NameDescription
setLicenseLicenses the component.

Tries to find the license in the following locations: 1. Explicit path. 2. The current working |

License()

Initializes a new instance of this class.

setLicense(licenseName) (1 of 2)

Licenses the component.

Tries to find the license in the following locations: 1. Explicit path. 2. The current working directory of the java application. 3. The folder that contains the Aspose component JAR file. 4. The folder that contains the client’s calling JAR file.


setLicense(byte_array) (2 of 2)

Licenses the component.

Use this method to load a license from a byte array.

ParameterTypeDescription
byte_arraybytesThe byte array

Example:

import jpype
import asposecells
jpype.startJVM()
from asposecells.api import *

lic = License()
with open('Aspose.Cells.lic', 'rb') as f:
    lic.setLicense(f.read())

wb = Workbook()
wb.save("wb.xlsx")

jpype.shutdownJVM()