New to Telerik UI for ASP.NET Core? Download free 30-day trial

ASP.NET Core PivotGrid Excel Export

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
excel_export.cshtml
Excel_ExportController.cs
Excel_Export_TagHelper.cshtml

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

The Telerik UI for ASP.NET Core PivotGrid control allows you to export its content to Excel by using the filtering applied by the user. For greater control over the output, configure the Export() export configuration method. For instance, you can specify the file name and whether to export all pages, margins, paper size, font, and so on.

The current example shows how to enable the export functionality for the PivotGrid through an external button, which, upon clicking, utilizes the client-side saveAsExcel() method while passing the explicitly defined Excel configurations set through the Excel() configuration method.

Note that the PivotGrid does not use the dataCellTemplate, columnHeaderTemplate, and rowHeaderTemplate configurations during Excel export and exports only its data, because the templates may contain arbitrary HTML which cannot be converted to Excel column values.

Additional Apps

This PivotGrid example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources