Version

Adding UltraSpreadsheet to Your Page

Purpose

This topic provides detailed instructions to help you get up and running as soon as possible with the UltraSpreadsheet.

Required background

The following table lists the concept and topics required as a prerequisite to understanding this topic.

Type Content

Concept

Infragistics Excel Engine

Topic Purpose

In this section you will find information that will help you to better understand the object model and the functionalities of the Infragistics Excel Engine.

This topic explains in details the features of the UltraSpreadsheet control from developer perspective.

This topic provides an overview of the visual elements of the UltraSpreadsheet control.

In this topic

This topic contains the following sections:

Adding UltraSpreadsheet to Your Page

Introduction

The procedure explains step by step the operations necessary for adding the UltraSpreadsheet to your page.

Overview

Following is a conceptual overview of the process:

1. Add assembly references

2. Add namespaces

3. Create UltraSpreadsheet

4. Create content (alternative)

5. Load content (alternative)

6. Bind/set workbook to the UltraSpreadsheet

Steps

The following steps demonstrate how to add the UltraSpreadsheet to your page.

1. Add assembly references

Add the following assembly references in your project:

  • Infragistics.dll

  • Infragistics.Undo.dll

  • Infragistics.Documents.Core.dll

  • Infragistics.Documents.Excel.dll

  • Infragistics.Win.UltraSpreadsheet

2. Add namespaces

Add the following namespaces:

In C#:

using Infragistics.Documents.Excel;
using Infragistics.Win;
using Infragistics.Win.UltraWinSpreadsheet;

In Visual Basic:

Imports Infragistics.Documents.Excel
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSpreadsheet

3. Create UltraSpreadsheet

Create and put the UltraSpreadsheet on your page:

In C#:

UltraSpreadsheet spreadsheet1 = new UltraSpreadsheet();

In VB:

Dim spreadsheet1 As New UltraSpreadsheet()

4. Create content (alternative)

Create a workbook, naming it "wb1" and add content in it as described in the Creating a Workbook (Infragistics Excel Engine) topic.

Note
Note

This step is an alternative to step 5.

5. Load content (alternative)

Load a workbook from a stream or file as described in the Read an Excel File (Infragistics Excel Engine) topic and name the workbook "wb1".

Note
Note

This step is an alternative to step 4.

6. Bind/set workbook to the UltraSpreadsheet

Set the UltraSpreadsheet’s Workbook property to the workbook create in the step 4 or 5.

In C#:

this.UltraSpreadsheet1.Workbook = wb1;

In Visual Basic:

Me.UltraSpreadsheet1.Workbook = wb1

Related Content

The following topics provide additional information related to this topic.

Topic Purpose

This is a set of topics describing how to configure the control.

This is a set of topics describing how to work with the control from developer perspective.