Install via NuGet

ReoGrid for Windows Forms

To install the ReoGrid Windows Forms standard edition, use the NuGet command:

PM> Install-Package unvell.ReoGrid.dll

ReoGrid for WPF

PM> Install-Package unvell.ReoGridWPF.dll

Install Visual Studio Toolbox Shortcut for Windows Forms

To add a shortcut to the Visual Studio toolbox, perform the following steps:

  1. Right-click on the Toolbox panel and click ‘Choose Items…’ 267
  2. Choose the ’.NET Framework Components’ tab
  3. Click the ‘Browse…’ button
  4. Choose ‘unvell.ReoGrid.dll’ in the open file dialog 268
  5. Click the OK button to close the dialog
  6. Click on the ReoGridControl item that appears at the bottom of the toolbar to select it: 12

Select a range on the form designer; when the mouse is released, the ReoGrid spreadsheet component will be added as shown below:

13

Add Control by Code for Windows Forms

ReoGrid provides different feature-set editions, and each edition has different reference requirements. Add references according to the edition used in your application.

  • Minimum Edition - Minimum feature set (no formula calculation supported)
  • Standard Release Edition - Standard features (Recommended)
  • Extension Edition - Extended features, including script language execution integration (like VBA)
DLL NameDescriptionMinimum EditionStandard Release EditionExtension Edition
unvell.ReoGrid.dllReoGrid component libraryRequiredRequiredRequired
unvell.ReoScript.dll.NET script language engineRequired
Antlr3.Runtime.dllANTLR grammar tool runtimeRequired
FastColoredTextBox.dllPowerful syntax-highlighted text editorRequired

If you are unsure which edition to use, the Standard Release Edition with a single DLL (unvell.ReoGrid.dll) is recommended.

Add Windows Forms Control in C#

  1. Import namespaces:
using unvell.ReoGrid;
  1. Create a ReoGrid instance and add it to any Windows Forms container, such as a Form or Panel.
var grid = new unvell.ReoGrid.ReoGridControl()
{
  Dock = DockStyle.Fill,
};

this.Controls.Add(grid);  // add to form or panel

Learn more about workbook and worksheet.

Add Windows Forms Control in VB.NET

  1. Import namespaces:
Imports unvell.ReoGrid
  1. Create a ReoGrid instance and add it to any Windows Forms container, such as a Form or Panel.
Dim grid As New MyReoGridControl() With {.Dock = DockStyle.Fill}
Me.Controls.Add(grid)

Add Control in XAML for WPF Applications

Add the ReoGrid DLL reference to the target project and edit the XAML file of the main window as shown below:

File MainWindow.xaml:

<Window
  xmlns="/schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="/schemas.microsoft.com/winfx/2006/xaml"
  **xmlns:rg="clr-namespace:unvell.ReoGrid;assembly=unvell.ReoGrid"**
  x:Class="WPFDemo.MainWindow" Title="MainWindow" Height="640" Width="800">
  <Grid>

    <rg:ReoGridControl x:Name="grid" ></rg:ReoGridControl>

  </Grid>
</Window>

Example: WPF Design Time

327

Was this article helpful?