xmlns:ig="http://schemas.infragistics.com/xaml"
This topic provides detailed instructions to help you get up and running as soon as possible with the XamSpreadsheet.
The following table lists the concept and topics required as a prerequisite to understanding this topic.
This topic contains the following sections:
The procedure explains step by step the operations necessary for adding the XamSpreadsheet to your page.
Following is a conceptual overview of the process:
1. Add assembly references
2. Add namespaces
3. Create XamSpreadsheet
4. Create content (alternative)
5. Load content (alternative)
6. Bind/set workbook to the XamSpreadsheet
The following steps demonstrate how to add the XamSpreadsheet to your page.
Add the following NuGet package reference in your project:
Infragistics.WPF.Spreadsheet
For more information on setting up the NuGet feed and adding NuGet packages, you can take a look at the following documentation: NuGet Feeds.
Add the following namespaces:
In XAML:
xmlns:ig="http://schemas.infragistics.com/xaml"
In C#:
using Infragistics.Controls.Editors; using Infragistics.Documents.Excel;
In Visual Basic:
Imports Infragistics.Controls.Editors Imports Infragistics.Documents.Excel
Create and put the XamSpreadsheet on your page:
In XAML:
<ig:XamSpreadsheet x:Name="xamSpreadsheet1"> </ig:XamSpreadsheet>
In C#:
XamSpreadsheet spreadsheet1 = new XamSpreadsheet();
In VB:
Dim spreadsheet1 As New XamSpreadsheet()
Create a workbook, naming it "wb1" and add content in it as described in the Creating a Workbook (Infragistics Excel Engine) topic.
Load a workbook from a stream or file as described in the Loading an Excel File (Infragistics Excel Engine) topic and name the workbook "wb1".
Set the XamSpreadsheet’s Workbook property to the workbook create in the step 4 or 5.
In C#:
this.XamSpreadsheet1.Workbook = wb1;
In Visual Basic:
Me.XamSpreadsheet1.Workbook = wb1
The following topics provide additional information related to this topic.