Documents for Excel, Java Edition Documentation
Getting Started / Quick Start
In This Topic
    Quick Start
    In This Topic

    The following quick start section help you in getting started with the GcExcel library:

    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..
      Java Settings dialog
    4. Select the gcexcel-3.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.

      RJar file under the Referenced Libraries

    Step 2 - Add the required dependencies

    Download the JSON Processing Default Provider and add reference to javax.json as a dependency library in your Java project.

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

    Apart from the above, following dependencies are also required:

    To know more about these dependencies, refer GcExcel Dependencies.

    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, 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

      Create a new workbook, access the default worksheet. You can also configure 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);

    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:"GcExcelFeatures.xlsx");


    Step 4 - 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.