Skip to content
+

GridExcelExportOptions Interface

The options to apply on the Excel export.

Demos

Import

import { GridExcelExportOptions } from '@mui/x-data-grid-premium';

Properties

Name Type Default Description
allColumns? boolean false If true, the hidden columns will also be exported.
columnsStyles? ColumnsStylesInterface Object mapping column field to Exceljs style
exceljsPostProcess? (processInput: GridExceljsProcessInput) => Promise<void> Method called after adding the rows to the workbook.
Not supported when worker is set.
To use with web workers, use the option in setupExcelExportWebWorker.
exceljsPreProcess? (processInput: GridExceljsProcessInput) => Promise<void> Method called before adding the rows to the workbook.
Not supported when worker is set.
To use with web workers, use the option in setupExcelExportWebWorker.
fields? string[] The columns exported.
This should only be used if you want to restrict the columns exports.
fileName? string document.title The string used as the file name.
getRowsToExport? (params: GridGetRowsToExportParams<Api>) => GridRowId[] Function that returns the list of row ids to export on the order they should be exported.
includeColumnGroupsHeaders? boolean true If true, the headers of the column groups will be added into the file.
includeHeaders? boolean true If true, the first row of the file will include the headers of the grid.
valueOptionsSheetName? string Name given to the worksheet containing the columns valueOptions.
valueOptions are added to this worksheet if they are provided as an array.
worker? () => Worker Function to return the Worker instance to be called.