• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

Columns

The Excel Export component supports options for customization of the columns that will be exported to Excel.

You can specify the following column options:

Hidden State

To hide a particular column from the exported file, use the hidden column configuration.

To hide a particular columns from the exported file, you can also use the *ngIf directive.

Example
View Source
Change Theme:

Locked State

The Excel Export enables you to lock columns by using the locked property of the columns. As a result, you can display specific columns at all times while the user scrolls the Excel file.

Example
View Source
Change Theme:

Templates

The Excel Export supports templates that you can use for customizing the group and footer elements.

Only the text content of the templates is exported. HTML elements cannot be converted to Excel column values.

Group Header Template

You can use the group header template to customize the header rows of the groups. To define a custom template, nest a <ng-template> tag with the kendoExcelExportGroupHeaderTemplate directive inside the <kendo-excelexport-column> tag.

The template context is set to the group item and the following additional fields are passed:

  • group—The current group item.
  • field—The name of the field by which data is grouped.
  • value—The current group value.
  • aggregates—All aggregate values for the current group.

If a template is not specified, the group header content is set to " { title / field }: { value }".

Example
View Source
Change Theme:

Group Header Column Template

You can use the group header column template to customize the column group header cells. To define a template, nest a <ng-template> tag with the kendoExcelExportGroupHeaderColumnTemplate directive inside the <kendo-excelexport-column> tag.

The template context is set to the group item and the following additional fields are passed:

  • group—The current group item.
  • field—The name of the field by which data is grouped.
  • value—The current group value.
  • aggregates—All aggregate values for the current group.
Example
View Source
Change Theme:

You can use the group footer template to customize the footer rows of the groups. To define a custom template, nest a <ng-template> tag with the kendoExcelExportGroupFooterTemplate directive inside the <kendo-excelexport-column> tag.

The template context is set to the current aggregates and the following additional fields are passed:

  • column—Defines an instance of the ColumnComponent option.
  • field—The current column field name.
  • group—The current group data item.

If a template is not specified for any of the columns, the exported Excel file will not render a group footer row.

Example
View Source
Change Theme:

You can use the footer template to customize the column footer. To define a footer template, nest a <ng-template> tag with the kendoExcelExportFooterTemplate directive inside the <kendo-excelexport-column> tag.

The template context is set to the current column and the following additional fields are passed:

  • column—Defines an instance of the ColumnComponent.
  • columnIndex—Defines the current column index.

If a template is not specified for any of the columns, the exported Excel file will not render a footer row.

Example
View Source
Change Theme:

Multi-Column Headers

The Excel Export supports multi-column headers by using column groups, which are defined declaratively by using the <kendo-excelexport-column-group> tag, that incorporate inner column structures.

Example
View Source
Change Theme: