Documents for Excel, Java Edition Documentation
Get Started / License Information
In This Topic
    License Information
    In This Topic

    Types of Licenses

    GcExcel Java supports the following types of license:

    Unlicensed

    When you download GcExcel Java for the first time, the product works under No-License i.e Unlicensed mode with a few limitations, that are highlighted below.

    Maximum time of opening and saving Excel files

    Every time a user runs an application, he/she can open or save up-to 100 excel files using GcExcel Java.

    Note that this limitation is triggered every time when users run the program, so that they can continue to open or save another 100 times after they restart their application.

    Maximum Operating Time

    While executing an application program, the duration of operating GcExcel Java will last up-to 10 hours.

    Once you complete the 10 hours of operation, you may notice the following:

    Note that this limitation will be reset every time when users run the program, so that they can continue to use the above APIs after they restart their program.

    Watermark Sheet

    When saving an Excel file, a new worksheet with watermark will be added. This sheet will be the active sheet of your workbook. The content of the watermark will tell users that no license is found and will provide our sales and contact information so that you can directly connect to our support team.

    When saving a PDF file, a PDF file with a watermark on the top of each exported page will be added. The content of the watermark will tell users which license is applied and will provide our sales and contact information.

    The following watermark will be displayed:

    "Unlicensed copy of GrapeCity Documents for Excel, Java Edition. Contact us.sales@grapecity.com to get your 30-day evaluation key to remove this text and other limitations".

    Evaluation License

    GcExcel Java trial license is available for one month for users to evaluate the product and see how it can help with their comprehensive project requirements.

    In order to evaluate the product, you can contact us.sales@grapecity.com and ask for the evaluation license key. The evaluation key is sent to users via email and holds valid for 30 days. After applying the evaluation license successfully, the product can be used without any limitations until the license date expires.

    After the expired date, the following limitations will be triggered:

    Cannot create new instance

    When your evaluation license expires, an exception specifying that the evaluation license is expired will be thrown on creating a new object of the workbook class.

    Open and Save Excel Files

    Save PDF Files

    API Limitations

    The following API's will stop working after your evaluation license has expired:
    API Remark
    IRange Throws an exception, same as create an instance of Workbook.
    IWorkbook.getWorksheets().add() Returns null.

    Watermark

    When saving an excel file, an Excel file with a watermark sheet will be saved. The content of watermark will tell users that no license is found and will provide our sales and contact information. When saving a PDF file, a PDF file with a watermark on the top of each exported page will be saved. The content of watermark will tell users which license is applied and will provide our sales and contact information.

    In case you're using an evaluation license, the following watermark will appear:

    "Expired Evaluation copy of GrapeCity Documents for Excel, Java Edition. Contact us.sales@grapecity.com to purchase license".

    Licensed

    GcExcel Java production license is issued at the time of purchase of the product. If you have production license, you can access all the features of GcExcel Java without any limitations.

    Watermark Sheet

    No watermark will be displayed when you have a production license.

    Apply License To GcExcel

    Applying license to GcExcel Java involves completing the following steps to create an application and license GcExcel:

    Step 1: Create a Java Project and add dependency for GcExcel library

    1. In Eclipse IDE, select File | New | Java Project to create a new Java project.
    2. In Project name field, enter the name of your project and click Next.
    3. In Java settings, under Libraries tab, click Add External JARs..
    4. Select the gcexcel-2.2.0.jar to add it to your project.
    5. Click Finish.
    6. The jar file will be added under the Referenced Libraries in your project.

    Step 2 - Add dependency for processing JSON

    Before you proceed with applying license to GcExcel Java, you need to first download the JSON Processing Default Provider and add reference to  javax.json as dependency library in your Java project.

    If you're using javax.json-1.1 and above, make sure you add the following two files in your java project in order to license it successfully -:

    javax.json-1.1.x.jar

    javax.json.api-1.1.x.jar

    Step 3 - Create a basic application with GcExcel Java

    To create a basic application with GcExcel Java, refer to the following tasks:

    1. Add Namespaces

      In Main.java, import the following namespaces -

      import com.grapecity.documents.excel.*;
      import com.grapecity.documents.excel.drawing.*;

    2. Create a new workbook, access the default worksheet and configure settings

      After applying product license, you can create a new workbook, access the default worksheet and set the tab color. You can also configure other settings like the default row height and column width of the worksheet. An example code is shown below:

      Workbook workbook = new Workbook();

      IWorksheet worksheet = workbook.getWorksheets().get(0);
      worksheet.setTabColor(Color.getGreen());
      worksheet.setStandardHeight(20);
      worksheet.setStandardWidth(50);

    3. Save the workbook

      After customizing the worksheet, you can save the workbook with the desired name and provide the required path. An example code is shown below:

      workbook.save("GcExcelFeatures.xlsx");

      You can view the saved GcExcelFeatures.xlsx file at the specified location.

    Step 4 - Add License

    1. Add the license key in one of the ways, either to license all the workbooks or just a specific workbook. These are explained below:
      • To license all the workbooks in a project, add the license by using SetLicenseKey method. This will license all the workbooks
        Main.java
        Copy Code
         Workbook.SetLicenseKey("Your License Key");

      • To license an instance of the workbook, add the license key when an instance of workbook is created. Add the following code.
        Main.java
        Copy Code
        Workbook workbook = new Workbook("Your License Key");

    Step 5 - Build and Run the Project

    When you finish, build and run your project. You will notice that the GcExcelFeatures.xlsx file is created at the specified location on your system.