New to Telerik UI for WPF? Download free 30-day trial

Getting Started with WPF Spreadsheet

This article explains how to add a RadSpreadsheet control to a page in your application.

It contains the following sections:

Assembly References

The assemblies that contain the implementation of RadSpreadsheet and must be referenced in order to use the control are:

  • Telerik.Windows.Controls.dll

  • Telerik.Windows.Controls.GridView.dll

  • Telerik.Windows.Controls.Input.dll

  • Telerik.Windows.Controls.Navigation.dll

  • Telerik.Windows.Controls.Spreadsheet.dll

  • Telerik.Windows.Data.dll

  • Telerik.Windows.Documents.Core.dll

  • Telerik.Windows.Documents.Spreadsheet.dll

For export and import to XLSX:

  • Telerik.Windows.Zip.dll

  • Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll

To export a document to PDF, you will need to add a reference to the corresponding assembly:

  • Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.dll

Note that in order to import/export in XLSX or export to PDF, the format provider must be registered manually. More information on Import/Export can be found here.

If you want to use the sample UI provided in our demos you should add this reference as well:

  • Telerik.Windows.Controls.RibbonView.dll
  • Telerik.Windows.Controls.SpreadsheetUI.dll

Namespaces

For a bare-bone Spreadsheet control, you only need a declaration of the telerik schema:

For the UI that enables the full-featured use of the control, you should also declare:

xmlns:spreadsheetControls="clr-namespace:Telerik.Windows.Controls.Spreadsheet.Controls;assembly=Telerik.Windows.Controls.Spreadsheet" 
xmlns:spreadsheet="clr-namespace:Telerik.Windows.Controls.Spreadsheet;assembly=Telerik.Windows.Controls.Spreadsheet" 

Then, all that is left is to add the Spreadsheet component to the page:

<telerik:RadSpreadsheet x:Name="radSpreadsheet" /> 

Spreadsheet and RibbonView

RadSpreadsheet is easy to integrate with all kinds of UI thanks to the commanding mechanism that it employs. If you would like to use the control with a RadRibbonView, which shows the full potential of the control, you can refer to the Spreadsheet UI topic that describes how you can take advantage of RadSpreadsheetRibbon.

Open/Save Documents

To open a document, you need to import it and the export functionalities will help you to save one. To work with documents of the formats supported by RadSpreadsheet, you should use the format provider classes. For more information on the matter, please check the Import/Export topic.

Telerik UI for WPF Learning Resources

See Also

In this article