ExcelExportSettings

Settings for controlling Excel export behavior. Defines data source, callbacks, filename, and feature toggles.

Props

The following table outlines the props for the ExcelExportSettings:

NameTypeDefaultDescription
columns
Partial<ColumnProps<T>>[]
-

Optional export-specific column customizations. Allows overriding grid column properties for the exported file (width, alignment, etc.). Properties specified here take precedence over grid column definitions. Matched to grid columns by field property. Feature Parity with PDF Export: Enables consistent column customization across export formats.

customRange
-

Defines the custom row range when range is set to Custom. Zero-based, inclusive startRow and endRow indices.

data
T[] | { [key: string]: unknown }
-

Array of data items to export, or a custom-binding response object with a result array. Required when using useExcelExport without gridRef. When UseGridExcelExportOptions.gridRef is provided, data is resolved from the grid automatically.

fileName
string
'export'

Optional filename for the exported Excel file (without extension). The .xlsx extension is added automatically.

footer
-

Footer configuration for adding custom footer rows below grid data. Allows company info, disclaimers, or contact information at the bottom of the export.

header
-

Header configuration for adding custom header rows above grid data. Allows company branding, titles, and metadata at the top of the export.

includeHiddenColumns
boolean
false

Include hidden columns in export. Applies if grid has column visibility toggling enabled.

isBlob
boolean
false

Export mode for the generated Excel file. When false or not provided, the file is downloaded automatically. When true, the generated Blob is returned for custom handling (e.g., upload, in-memory processing).

maxRowsWarningThreshold
number
undefined

When the exported row count exceeds this threshold, export is canceled with an error. Useful for protecting users from very large Excel exports.

onAfterExcelExport
(event: ExcelAfterExportEvent<T>) => void
-

Callback triggered after Excel export completes or fails. Notifies of export result and any errors. Feature Parity with PDF Export: Mirrors onAfterPdfExport for consistent API.

onBeforeExcelExport
(event: ExcelBeforeExportEvent<T>) => void
-

Callback triggered before Excel export begins. Allows modification of columns and data before export processing. Set event.cancel = true to abort the export. Feature Parity with PDF Export: Mirrors onBeforePdfExport for consistent API.

onExcelCellCustomize
(args: ExcelCellCustomizeArgs<T>) => void | Promise<void>
-

Callback invoked for each cell during export. Allows customization of cell appearance, content, and behavior. Supports both synchronous and asynchronous callbacks (async functions and Promises are awaited). Handlers execute in this order: Image → Hyperlink → Spanning → Formatting → Grouping. Set any of: image, hyperLink, colSpan, rowSpan, numberFormat, style.

range
'All'

Specifies which rows to include in the Excel export.

  • All (default) — Exports all rows from the full data source.
  • CurrentPage — Exports only rows visible on the current page.
  • Custom — Exports rows within the range defined by customRange.
theme
'default'

Theme to apply to exported cells (e.g., 'Material', 'Bootstrap', 'Fluent'). Affects default colors and styling.