# 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](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/columns#hidden-state)
* [Locked state](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/columns#locked-state)
* [Templates](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/columns#templates)
* [Multi-column headers](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/columns#multi-column-headers)

## Hidden State

To hide a particular column from the exported file, use the [`hidden`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops#hidden) column configuration.

> To hide a particular columns from the exported file, you can also use [`conditional rendering`](https://react.dev/learn/conditional-rendering#conditionally-returning-jsx).

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/hidden/func/source.txt)

## Locked State

The Excel Export enables you to lock columns by using the [`locked`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops#locked) property of the columns. As a result, you can display specific columns at all times while the user scrolls the Excel file.

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/locked/func/source.txt)

## Templates

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

> The templates must return text content. 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 use a custom template set the [`groupHeader`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops#groupheader) property to a Function or a React Component extending [`ExcelExportHeaderGroup`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportgroupheader).

The following additional fields are passed as props to the component, or through arguments to the function:

* `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 }"`.

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/group-header/func/source.txt)

### Group Footer Template

You can use the group footer template to customize the footer rows of the groups. To use a custom template set the [`groupFooter`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops#groupfooter) property to a Function or a React Component extending [`ExcelExportFooterGroup`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportgroupfooter).

The following additional fields are passed as props to the component, or through arguments to the function:

* `column`—Defines an object of type [`ExcelExportColumnProps`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops).
* `field`—The current column field name.
* `group`—The current group data item.
* `aggregates`—All aggregate values for the current group.

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

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/group-footer/func/source.txt)

### Footer Template

You can use the footer template to customize the column footer. To use a custom template set the [`footer`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops#footer) property to a Function or a React Component extending [`ExcelExportFooter`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportfooter).

The following additional fields are passed as props to the component, or through arguments to the function:

* `column`—Defines an object of type [`ExcelExportColumnProps`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumnprops).
* `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.

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/footer/func/source.txt)

## Multi-Column Headers

The Excel Export supports multi-column headers by using column groups, which are defined declaratively by using the [`ExcelExportColumnGroup`](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexportcolumngroup) components, that incorporate inner column structures.

[Demo Source](https://demos.telerik.com/kendo-react-ui/excel/columns/multi/func/source.txt)

## Suggested Links

* [React Excel Export](https://www.telerik.com/kendo-react-ui-develop/components/excelexport)
* [API Reference of the Excel Export Component](https://www.telerik.com/kendo-react-ui-develop/components/excelexport/api/excelexport)
