Click or drag to resize

Hello World Example

Before using GemBox.Spreadsheet for Java, you need to add the component using one of the following methods:

Usage with maven
<!-- Add reference to the GemBox repository -->
<repository>
  <id>com.gembox</id>
  <name>GemBox API</name>
  <url>https://gemboxsoftware.com/repo/</url>
</repository>

<!-- Add dependency -->
<dependency>
  <groupId>com.gembox</groupId>
  <artifactId>gembox-spreadsheet</artifactId>
  <version>1.1.1062</version>
</dependency>

After including GemBox.Spreadsheet component to your project, you need to set license key. To use GemBox.Spreadsheet in Free mode, use SpreadsheetInfo.setLicense("FREE-LIMITED-KEY");.

Example

Using GemBox.Spreadsheet component is easy and straightforward. The following code shows how to create a spreadsheet with a single 'Hello World' cell:

Java
// Set license key to use GemBox.Spreadsheet in a Free mode.
SpreadsheetInfo.setLicense("FREE-LIMITED-KEY");

ExcelFile file = new ExcelFile();

file.addWorksheet("Test").getCell("A1").setValue("Hello World");

file.save("Test.xlsx");