Click or drag to resize

Hello World Example

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

Step–by–step guide to using GemBox.Spreadsheet

  1. Create a new .NET project (or use an existing one).

  2. If you installed Setup, then add a reference to the GemBox.Spreadsheet component using the Add Reference dialog (it'll be under Assemblies -> Extensions); otherwise you can skip this step (NuGet automatically adds a reference).

  3. Add a directive for GemBox.Spreadsheet namespace; for a C# project use "using GemBox.Spreadsheet;", for a VB.NET project use "Import GemBox.Spreadsheet".

  4. Set the license key to use GemBox.Spreadsheet in Free mode; for a C# project use "SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");", for a VB.NET project use "SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")".

Now you can write your application–specific spreadsheet processing code like the one below.


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

// Create new empty Excel file.
ExcelFile ef = new ExcelFile();

// Create new worksheet and set cell A1 value to 'Hello World!'.
ef.Worksheets.Add("Test").Cells["A1"].Value = "Hello World!";

// Save to XLSX file.