---
title: "Excel Export API Reference"
enterprise: true
framework: react
version: "36.1.0"
---

# Excel Export API Reference

This page documents the Excel Export API and Interfaces.

### Grid Properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `defaultExcelExportParams` | [`ExcelExportParams`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelexportparams) |  |  | A default configuration object used to export to Excel. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |
| `suppressExcelExport` | `boolean` |  | `false` | Prevents the user from exporting the grid to Excel. |
| `excelStyles` | [`ExcelStyle[]`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelstyle) |  |  | A list (array) of Excel styles to be used when exporting to Excel with styles. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). [Initial](https://www.ag-grid.com/react-data-grid/grid-interface/#initial-grid-options). |

### API Methods

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `exportDataAsExcel` | `Function` |  |  | Downloads an Excel export of the grid's data. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |
| `getDataAsExcel` | `Function` |  |  | Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |
| `getSheetDataForExcel` | `Function` |  |  | This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |
| `exportMultipleSheetsAsExcel` | `Function` |  |  | Downloads an Excel export of multiple sheets in one file. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |
| `getMultipleSheetsAsExcel` | `Function` |  |  | Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. Module: [`ExcelExportModule`](https://www.ag-grid.com/react-data-grid/modules/). |

## Interfaces

### ExcelExportParams

Properties available on the `ExcelExportParams` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `addImageToCell` | `Function` |  |  | Use to export an image for the gridCell in question. |
| `allColumns` | `boolean` |  | `false` | If `true`, all columns will be exported in the order they appear in the columnDefs. When `false` only the columns currently being displayed will be exported. |
| `appendContent` | `ExcelRow[]` |  |  | Content to put at the top of the exported sheet. An array of ExcelRow objects, see [Extra Content section](https://www.ag-grid.com/react-data-grid/excel-export-extra-content/). |
| `author` | `string` |  | `"AG Grid"` | The author of the exported file. @default "AG Grid" |
| `autoConvertFormulas` | `boolean` |  | `false` | If set to `true`, this will try to convert any cell that starts with `=` to a formula, instead of setting the cell value as regular string that starts with `=`. |
| `columnKeys` | `(string \| Column)[]` |  |  | Provide a list (an array) of column keys or Column objects if you want to export specific columns. |
| `columnWidth` | `number \| ((params: ColumnWidthCallbackParams) => number)` |  |  | Defines the default column width. If no value is present, each column will have value currently set in the application with a min value of 75px. This property can also be supplied a callback function that returns a number. |
| `customMetadata` | `ExcelCustomMetadata` |  |  | Custom metadata to be written to in the exported file. Values are serialised as strings. |
| `exportAsExcelTable` | [`boolean \| ExcelTableConfig`](https://www.ag-grid.com/react-data-grid/excel-export-api/#exceltableconfig) |  | `false` | Used to add an Excel table to the spreadsheet. Set to `true` to use default export table config, or provide a config object. @default false |
| `exportRowNumbers` | `boolean` |  |  | Set to `true` to allow the contents of the Row Numbers column to be exported. |
| `exportedRows` | `'all' \| 'filteredAndSorted'` |  | `'filteredAndSorted'` | Determines whether rows are exported before being filtered and sorted. |
| `fileName` | `string \| ExportFileNameGetter` |  | `export.xlsx` | String to use as the file name or a function that returns a string. |
| `fontSize` | `number` |  | `11` | The default value for the font size of the Excel document. |
| `freezeColumns` | `'pinned' \| ExcelFreezeColumnsGetter` |  |  | Use this property to select to freeze columns at the start of the grid (this will be the columns at the right for RTL). `pinned` - Freeze all pinned left (right for RTL grids) columns. A callback function that will freeze columns until a value other than `true` is returned. After that, this callback will no longer be executed. |
| `freezeRows` | `'headers' \| 'headersAndPinnedRows' \| ExcelFreezeRowsGetter` |  |  | Use this property to select to freeze rows at the top of the exported sheet. `headers` - Freeze all grid headers at the top. `headersAndPinnedRows` - Freeze all headers and pinned top rows. A callback function that will freeze rows until a value other than `true` is returned, after that, this callback will no longer be executed. Note that using a callback will automatically freeze all header rows. |
| `getCustomContentBelowRow` | `Function` |  |  | A callback function to return content to be inserted below a row in the export. |
| `headerFooterConfig` | [`ExcelHeaderFooterConfig`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfooterconfig) |  |  | The configuration for header and footers. |
| `headerRowHeight` | `number \| ((params: RowHeightCallbackParams) => number)` |  |  | The height in pixels of header rows. Defaults to Excel default value. This property can also be supplied a callback function that returns a number. |
| `margins` | [`ExcelSheetMargin`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelsheetmargin) |  |  | The Excel document page margins. Relevant for printing. |
| `mimeType` | `string` |  | `'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'` | The mimeType of the Excel file. |
| `onlySelected` | `boolean` |  | `false` | Export only selected rows. |
| `onlySelectedAllPages` | `boolean` |  | `false` | Only export selected rows including other pages (only makes sense when using pagination). |
| `pageSetup` | [`ExcelSheetPageSetup`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelsheetpagesetup) |  |  | Allows you to setup the page orientation and size. |
| `prependContent` | `ExcelRow[]` |  |  | Content to put at the bottom of the exported sheet. An array of ExcelRow objects, see [Extra Content section](https://www.ag-grid.com/react-data-grid/excel-export-extra-content/). |
| `processCellCallback` | `Function` |  |  | A callback function invoked once per cell in the grid. Return a string value to be displayed in the export. For example this is useful for formatting date values. |
| `processGroupHeaderCallback` | `Function` |  |  | A callback function invoked once per column group. Return a `string` to be displayed in the column group header. Note that column groups are exported by default, this option will not work with `skipColumnGroupHeaders=true`. |
| `processHeaderCallback` | `Function` |  |  | A callback function invoked once per column. Return a string to be displayed in the column header. |
| `processNoteCallback` | `Function` |  |  | A callback invoked for each exported cell, allowing Excel notes/comments to be customised, injected, or suppressed. See [Notes](https://www.ag-grid.com/react-data-grid/excel-export-notes/). |
| `processRowGroupCallback` | `Function` |  |  | A callback function invoked once per row group. Return a `string` to be displayed in the group cell. |
| `protectSheet` | `boolean \| ExcelSheetProtection` |  | `false` | If `true`, protects the worksheet to enforce `ExcelStyle.protection` settings. Provide an `ExcelSheetProtection` config object to allow specific actions on the protected sheet. |
| `rightToLeft` | `boolean` |  | `undefined` | Use to set the direction for the worksheet. `true`: Sets the direction to right-to-left (RTL). `false`: Sets the direction to left-to-right (LTR). `undefined`: Exports the worksheet according to the current direction of the grid as set by `gridOptions.enableRtl`. |
| `rowGroupExpandState` | `'expanded' \| 'collapsed' \| 'match'` |  | `'expanded'` | The expand/collapse state of each row group in the Excel Document. expanded: All row groups will be expanded by default. collapsed: All row groups will be collapsed by default. match: The row groups will match their current state in the Grid. |
| `rowHeight` | `number \| ((params: RowHeightCallbackParams) => number)` |  |  | The height in pixels of all rows. Defaults to Excel default value. This property can also be supplied a callback function that returns a number. |
| `rowPositions` | `RowPosition[]` |  |  | Row node positions. |
| `sheetName` | `string \| ExcelSheetNameGetter` |  | `'ag-grid'` | The name of the sheet in Excel where the grid will be exported. Either a string or a function that returns a string can be used. If a function is used, it will be called once before the export starts. There is a max limit of 31 characters per sheet name. |
| `shouldRowBeSkipped` | `Function` |  |  | A callback function that will be invoked once per row in the grid. Return true to omit the row from the export. |
| `skipColumnGroupHeaders` | `boolean` |  | `false` | Set to `true` to exclude header column groups. |
| `skipColumnHeaders` | `boolean` |  | `false` | Set to `true` if you don't want to export column headers. |
| `skipPinnedBottom` | `boolean` |  | `false` | Set to `true` to suppress exporting rows pinned to the bottom of the grid. |
| `skipPinnedRowDuplicates` | `boolean` |  | `false` | Set to `true` to omit the body copies of manually pinned rows. The rows in the pinned sections are still exported unless `skipPinnedTop` or `skipPinnedBottom` is enabled. |
| `skipPinnedTop` | `boolean` |  | `false` | Set to `true` to suppress exporting rows pinned to the top of the grid. |
| `skipRowGroups` | `boolean` |  | `false` | Set to `true` to skip row group headers if grouping rows. Only relevant when grouping rows. |
| `suppressColumnOutline` | `boolean` |  | `false.` | If `true`, the outline (controls to expand and collapse) for Group Columns will not be added automatically to the Excel Document. |
| `suppressGridNotesExport` | `boolean` |  | `false` | Set to `true` to suppress automatic export of cell notes from `notesDataSource`. See [Notes](https://www.ag-grid.com/react-data-grid/excel-export-notes/). |
| `suppressPrependAuthorToNotes` | `boolean` |  | `false` | Set to `true` to suppress prepending the author name as bold text in the exported Excel note body. The note author is still stored in the exported Excel note metadata. See [Notes](https://www.ag-grid.com/react-data-grid/excel-export-notes/). |
| `suppressRowOutline` | `boolean` |  | `false.` | If `true`, the outline (controls to expand and collapse) for Row Groups will not be added automatically to the Excel Document. |
| `transformValues` | `boolean` |  | `true` | Apply the Show Values As transform (e.g. a percentage of a total) on top of the `valueFrom` base, so the export carries the displayed value for columns with an active mode. Columns without one export the base value. |
| `valueFrom` | `CellValueResolveFrom` |  | `'data'` | The base source to use for getting cell values. `'data'`: values from the underlying row data `'batch'`: pending batch edit values (falls back to data if not in batch mode) `'edit'`: current editor values including live typing |

### ExcelExportMultipleSheetParams

Properties available on the `ExcelExportMultipleSheetParams` interface.

See [Multiple Sheets](https://www.ag-grid.com/react-data-grid/excel-export-multiple-sheets/) for more information.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `data` | `string[]` |  |  | Array of strings containing the raw data for Excel workbook sheets. This property is only used when exporting to multiple sheets using `api.exportMultipleSheetsAsExcel()` and the data for each sheet is obtained by calling `api.getSheetDataForExcel()`. |
| `activeSheetIndex` | `number` |  | `0` | The index of the sheet to be marked as active by default. |
| `fileName` | `string \| ExportFileNameGetter` |  | `'export.xlsx'` | String to use as the file name or a function that returns a string. |
| `author` | `string` |  | `"AG Grid"` | The author of the exported file. @default "AG Grid" |
| `suppressPrependAuthorToNotes` | `boolean` |  | `false` | Set to `true` to suppress prepending the author name as bold text in the exported Excel note body. The note author is still stored in the exported Excel note metadata regardless of this setting. |
| `fontSize` | `number` |  | `11` | The default value for the font size of the Excel document. |
| `mimeType` | `string` |  | `'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'` | The mimeType of the Excel file. |
| `customMetadata` | `ExcelCustomMetadata` |  |  | Custom metadata to write to `docProps/custom.xml` in the exported file. Values are serialised as strings. |

### ExcelAlignment

Properties available on the `ExcelAlignment` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `horizontal` | `\| 'Automatic'         \| 'Left'         \| 'Center'         \| 'Right'         \| 'Fill'         \| 'Justify'         \| 'CenterAcrossSelection'         \| 'Distributed'         \| 'JustifyDistributed'` |  | `'Automatic'` | Use this property to change the cell horizontal alignment. |
| `indent` | `number` |  | `0` | Use this property to change the level of indentation in the cell. |
| `readingOrder` | `'RightToLeft' \| 'LeftToRight' \| 'Context'` |  | `'LeftToRight'` | Use this property to change the cell reading order. |
| `rotate` | `number` |  | `0` | The number of degrees between 0 and 359 to rotate the text. |
| `shrinkToFit` | `boolean` |  | `false` | If set to `true`, the font size of the cell will automatically change to force the text to fit within the cell. |
| `vertical` | `'Automatic' \| 'Top' \| 'Bottom' \| 'Center' \| 'Justify' \| 'Distributed' \| 'JustifyDistributed'` |  | `'Automatic'` | Use this property to change the cell vertical alignment. |
| `wrapText` | `boolean` |  | `false` | If set to `true`, multiline text will be displayed as multiline by Excel. |

### ExcelBorders

Properties available on the `ExcelBorders` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `borderBottom` | [`ExcelBorder`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelborder) |  |  | Use to set the cell's bottom border. |
| `borderLeft` | [`ExcelBorder`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelborder) |  |  | Use to set the cell's left border. |
| `borderRight` | [`ExcelBorder`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelborder) |  |  | Use to set the cell's right border. |
| `borderTop` | [`ExcelBorder`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelborder) |  |  | Use to set the cell's top border. |

### ExcelBorder

Properties available on the `ExcelBorder` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `color` | `string` |  | `'black'` | The color or the border. |
| `lineStyle` | `'None' \| 'Continuous' \| 'Dash' \| 'Dot' \| 'DashDot' \| 'DashDotDot' \| 'SlantDashDot' \| 'Double'` |  | `'None'` | The style of the border. |
| `weight` | `0 \| 1 \| 2 \| 3` |  | `0` | The thickness of the border from 0 (thin) to 3 (thick). |

### ExcelCell

Properties available on the `ExcelCell` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `data` | [`ExcelData`](https://www.ag-grid.com/react-data-grid/excel-export-api/#exceldata) |  |  | The data that will be added to the cell. |
| `ref` | `string` |  |  | Cell reference. |
| `collapsibleRanges` | `number[][]` |  |  | Collapsible ranges. |
| `styleId` | `string \| string[]` |  |  | The ExcelStyle id to be associated with the cell. |
| `mergeAcross` | `number` |  | `0` | The number of cells to span across (1 means span 2 columns). |
| `note` | `ExcelNote` |  |  | Optional note/comment to export for this cell. |

### ExcelNote

Properties available on the `ExcelNote` interface.

See [Notes](https://www.ag-grid.com/react-data-grid/excel-export-notes/) for more information.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `text` | `string` | Yes |  | The body text to export in the Excel note/comment. |
| `author` | `string` |  |  | Optional author name displayed in the exported Excel note. When omitted, the document `author` is used. |

### ExcelData

Properties available on the `ExcelData` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `type` | `ExcelDataType \| ExcelOOXMLDataType` | Yes |  | The type of data being in the cell. |
| `value` | `string \| null` | Yes |  | The value of the cell. |

### ExcelFont

Properties available on the `ExcelFont` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `bold` | `boolean` |  | `false` | Set to `true` to set the cell text to bold. |
| `color` | `string` |  | `'#000000'` | The color of the cell font. |
| `family` | `string` |  | `'Automatic'` | The family of the font to used in the cell. Options: `Automatic`,`Roman`,`Swiss`,`Modern`,`Script`,`Decorative`, |
| `fontName` | `string` |  | `'Calibri'` | The name of the font to be used in the cell. |
| `italic` | `boolean` |  | `false` | Set to `true` to display the cell font as italic. |
| `outline` | `boolean` |  | `false` | Set to `true` to add a text outline. |
| `shadow` | `boolean` |  | `false` | Set to `true` to add text shadow. |
| `size` | `number` |  |  | Set this property to used a different font size other than the default. |
| `strikeThrough` | `boolean` |  | `false` | Set to `true` to add a strikeThrough line. |
| `underline` | `'Single' \| 'Double'` |  |  | Use this property to underline the cell text. |
| `verticalAlign` | `'Superscript' \| 'Subscript'` |  |  | Use this property to change the default font alignment. Note: This is different than setting cell vertical alignment. |

### ExcelHeaderFooterConfig

Properties available on the `ExcelHeaderFooterConfig` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `all` | [`ExcelHeaderFooter`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfooter) |  |  | The configuration for header and footer on every page. |
| `first` | [`ExcelHeaderFooter`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfooter) |  |  | The configuration for header and footer on the first page only. |
| `even` | [`ExcelHeaderFooter`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfooter) |  |  | The configuration for header and footer on even numbered pages only. |

### ExcelHeaderFooter

Properties available on the `ExcelHeaderFooter` interface. At least one of header or footer is required or both.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `header` | [`ExcelHeaderFooterContent[]`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfootercontent) |  |  | An array of maximum 3 items (`Left`, `Center`, `Right`), containing header configurations. |
| `footer` | [`ExcelHeaderFooterContent[]`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfootercontent) |  |  | An array of maximum 3 items (`Left`, `Center`, `Right`), containing footer configurations. |

### ExcelHeaderFooterContent

Properties available on the `ExcelHeaderFooterContent` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | `string` | Yes |  | The value of the text to be included in the header. |
| `image` | [`ExcelHeaderFooterImage`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelheaderfooterimage) |  |  | When value is `&[Picture]`, this should be used as the referenced image. |
| `position` | `'Left' \| 'Center' \| 'Right'` |  | `'Left'` | Configures where the text should be added: `Left`, `Center` or `Right`. |
| `font` | [`ExcelFont`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelfont) |  |  | The font style of the header/footer value. |

### ExcelHeaderFooterImage

Properties available on the `ExcelHeaderFooterImage` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | `number` | Yes |  | The width of the image in pixels. |
| `height` | `number` | Yes |  | The height of the image in pixels. |
| `id` | `string` | Yes |  | The image `id`. This field is required so the same image doesn't get imported multiple times. |
| `base64` | `string` | Yes |  | A base64 string that represents the image being imported. See [Base64](https://en.wikipedia.org/wiki/Base64) for more information. |
| `imageType` | `'jpg' \| 'png' \| 'gif'` | Yes |  | The type of image being exported. |
| `recolor` | `'Grayscale' \| 'Black & White' \| 'Washout'` |  |  | Set this property to select a preset that changes the appearance of the image. |
| `brightness` | `number` |  |  | The brightness of the image between 0 and 100 (if `recolor` is used, this value will only be applied for `Grayscale`). Default 50 |
| `contrast` | `number` |  |  | The contrast of the image between 0 and 100. (If `recolor` is used, this value will only be applied for `Grayscale`.). Default 50 |
| `altText` | `string` |  |  | Alt Text for the image. |

### ExcelImage

Properties available on the `ExcelImage` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes |  | The image `id`. This field is required so the same image doesn't get imported multiple times. |
| `base64` | `string` | Yes |  | A base64 string that represents the image being imported. See [Base64](https://en.wikipedia.org/wiki/Base64) for more information. |
| `imageType` | `'jpg' \| 'png' \| 'gif'` | Yes |  | The type of image being exported. |
| `fitCell` | `boolean` |  | `false` | If set to `true`, the image will cover the whole cell that is being imported to. This property does not apply to images in the Header/Footer |
| `transparency` | `number` |  | `0` | Set a value between 0 - 100 that will indicate the percentage of transparency of the image. |
| `rotation` | `number` |  | `0` | Set a value between 0 - 359 that will indicate the number of degrees to rotate the image clockwise. |
| `recolor` | `'Grayscale' \| 'Sepia' \| 'Washout'` |  |  | Set this property to select a preset that changes the appearance of the image. |
| `width` | `number` |  |  | The width of the image in pixels. If this value is not selected, `fitCell` will be automatically set to true. |
| `height` | `number` |  |  | The height of the image in pixels. If this value is not selected, `fitCell` will be automatically set to true. |
| `position` | [`ExcelImagePosition`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelimageposition) |  |  | Position of the image. |
| `altText` | `string` |  |  | Alt Text for the image. |

### ExcelImagePosition

Properties available on the `ExcelImagePosition` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `row` | `number` |  |  | The row containing this image. This property is set automatically, don't change it unless you know what you are doing. |
| `rowSpan` | `number` |  | `1` | The amount of rows this image will cover. @default 1 |
| `column` | `number` |  |  | The column containing this image. This property is set automatically, don't change it unless you know what you are doing. |
| `colSpan` | `number` |  | `1` | The amount of columns this image will cover. |
| `offsetX` | `number` |  | `0` | The amount in pixels the image should be offset horizontally. |
| `offsetY` | `number` |  | `0` | The amount in pixels the image should be offset vertically. |

### ExcelInterior

Properties available on the `ExcelInterior` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `pattern` | `\| 'None'         \| 'Solid'         \| 'Gray75'         \| 'Gray50'         \| 'Gray25'         \| 'Gray125'         \| 'Gray0625'         \| 'HorzStripe'         \| 'VertStripe'         \| 'ReverseDiagStripe'         \| 'DiagStripe'         \| 'DiagCross'         \| 'ThickDiagCross'         \| 'ThinHorzStripe'         \| 'ThinVertStripe'         \| 'ThinReverseDiagStripe'         \| 'ThinDiagStripe'         \| 'ThinHorzCross'         \| 'ThinDiagCross'` |  |  | Use this property to set background color patterns. |
| `color` | `string` |  |  | The colour to be used as a secondary colour combined with patterns. |
| `patternColor` | `string` |  |  | The pattern color. |

### ExcelNumberFormat

Properties available on the `ExcelNumberFormat` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `format` | `string` |  |  | Use this property to provide a pattern to format a number. (eg. 10000 could become $10,000.00). |

### ExcelProtection

Properties available on the `ExcelProtection` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `protected` | `boolean` |  | `true` | Set to `false` to disable cell protection (locking) |
| `hideFormula` | `boolean` |  | `false` | Set to `true` to hide formulas within protected cells. |

### ExcelSheetMargin

Properties available on the `ExcelSheetMargin` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `top` | `number` |  | `0.75` | The sheet top margin. |
| `right` | `number` |  | `0.7` | The sheet right margin. |
| `bottom` | `number` |  | `0.75` | The sheet bottom margin. |
| `left` | `number` |  | `0.7` | The sheet left margin. |
| `header` | `number` |  | `0.3` | The sheet header margin. |
| `footer` | `number` |  | `0.3` | The sheet footer margin. |

### ExcelSheetPageSetup

Properties available on the `ExcelSheetPageSetup` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `orientation` | `'Portrait' \| 'Landscape'` |  | `'Portrait'` | Use this property to change the print orientation. |
| `pageSize` | `\| 'Letter'         \| 'Letter Small'         \| 'Tabloid'         \| 'Ledger'         \| 'Legal'         \| 'Statement'         \| 'Executive'         \| 'A3'         \| 'A4'         \| 'A4 Small'         \| 'A5'         \| 'A6'         \| 'B4'         \| 'B5'         \| 'Folio'         \| 'Envelope'         \| 'Envelope DL'         \| 'Envelope C5'         \| 'Envelope B5'         \| 'Envelope C3'         \| 'Envelope C4'         \| 'Envelope C6'         \| 'Envelope Monarch'         \| 'Japanese Postcard'         \| 'Japanese Double Postcard'` |  | `'Letter'` | Use this property to set the sheet size. |

### ExcelSheetProtection

Configuration for worksheet protection, used by `ExcelExportParams.protectSheet`.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `autoFilter` | `boolean` |  | `false` | Allow using AutoFilter when worksheet protection is enabled. |
| `deleteColumns` | `boolean` |  | `false` | Allow deleting columns when worksheet protection is enabled. |
| `deleteRows` | `boolean` |  | `false` | Allow deleting rows when worksheet protection is enabled. |
| `formatCells` | `boolean` |  | `false` | Allow formatting cells when worksheet protection is enabled. |
| `formatColumns` | `boolean` |  | `false` | Allow formatting columns when worksheet protection is enabled. |
| `formatRows` | `boolean` |  | `false` | Allow formatting rows when worksheet protection is enabled. |
| `insertColumns` | `boolean` |  | `false` | Allow inserting columns when worksheet protection is enabled. |
| `insertHyperlinks` | `boolean` |  | `false` | Allow inserting hyperlinks when worksheet protection is enabled. |
| `insertRows` | `boolean` |  | `false` | Allow inserting rows when worksheet protection is enabled. |
| `pivotTables` | `boolean` |  | `false` | Allow using PivotTables when worksheet protection is enabled. |
| `selectLockedCells` | `boolean` |  | `true` | Allow selecting locked cells when worksheet protection is enabled. |
| `selectUnlockedCells` | `boolean` |  | `true` | Allow selecting unlocked cells when worksheet protection is enabled. |
| `password` | `string` |  |  | Optional password required to unprotect the worksheet. |

### ExcelStyle

Properties available on the `ExcelStyle` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes |  | The id of the Excel Style, this should match a CSS cell class. |
| `alignment` | [`ExcelAlignment`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelalignment) |  |  | Use this property to customise cell alignment properties. |
| `borders` | [`ExcelBorders`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelborders) |  |  | Use this property to customise cell borders. |
| `dataType` | [`ExcelDataType`](https://www.ag-grid.com/react-data-grid/excel-export-api/#exceldatatype) |  |  | Use this property to specify the type of data being exported. |
| `font` | [`ExcelFont`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelfont) |  |  | Use this property to customise the font used in the cell. |
| `interior` | [`ExcelInterior`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelinterior) |  |  | Use this property to customise the cell background. |
| `numberFormat` | [`ExcelNumberFormat`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelnumberformat) |  |  | Use this property to customise the cell value as a formatted number. |
| `protection` | [`ExcelProtection`](https://www.ag-grid.com/react-data-grid/excel-export-api/#excelprotection) |  |  | Use this property to configure cell locking and formula visibility for the exported worksheet. This must be used together with `ExcelExportParams.protectSheet`. |

### ExcelTableConfig

Properties available on the `ExcelTableConfig` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `string` |  | `'AG-GRID-TABLE'` | This property is used to set the table name. It should be an alphanumeric string with no special characters. |
| `showFilterButton` | `boolean \| 'match'` |  | `match` | Set this property to `false` to disable the filter button at the exported Excel table header. Set it to `true` to show the filter button on all columns. Set it to `match` to show the filter button only if the column has a filter allowed. |
| `showRowStripes` | `boolean` |  | `true` | Set this property to `false` to hide the row stripes. |
| `showColumnStripes` | `boolean` |  | `false` | Set this property to `true` to show column stripes. |
| `highlightFirstColumn` | `boolean` |  | `false` | Set this property to `true` to show the first column in bold/highlighted style. |
| `highlightLastColumn` | `boolean` |  | `false` | Set this property to `true` to show the last column in bold/highlighted style. |

### ProcessNoteForExportParams

Properties available on the `ProcessNoteForExportParams&lt;TData = any, TContext = any&gt;` interface.

See [Notes](https://www.ag-grid.com/react-data-grid/excel-export-notes/) for more information.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `gridNote` | `Note` |  |  | The grid note resolved for the current cell, when the Notes feature is available. |
| `excelNote` | `ExcelNote` |  |  | The Excel note/comment value derived from `gridNote` when automatic note export is enabled. |
| `value` | `any` |  |  | The raw cell value before any formatting or processing. |
| `accumulatedRowIndex` | `number` |  |  | The zero-based row index in the exported output, including any prepended content rows. Only populated for file export flows (`'excel'`, `'csv'`); omitted for clipboard flows. |
| `node` | [`IRowNode \| null`](https://www.ag-grid.com/react-data-grid/row-object/) |  |  | The row node for the cell. May be `null` or `undefined` for clipboard flows when no row is associated. |
| `column` | [`Column`](https://www.ag-grid.com/react-data-grid/column-object/) |  |  | The column for the cell. |
| `type` | `string` |  |  | The operation that triggered the callback |
| `parseValue` | `Function` |  |  | Utility function to parse a value using the column's `colDef.valueParser` |
| `formatValue` | `Function` |  |  | Utility function to format a value using the column's `colDef.valueFormatter` |
| `api` | [`GridApi`](https://www.ag-grid.com/react-data-grid/grid-api/) |  |  | The grid api. |
| `context` | [`TContext`](https://www.ag-grid.com/react-data-grid/typescript-generics/#context-tcontext) |  |  | Application context as set on `gridOptions.context`. |

## Types

### ExcelDataType

```ts
type ExcelDataType =
    'String'   |
    'Formula'  |
    'Number'   |
    'Boolean'  |
    'DateTime' |
    'Error'
```

### ExcelOOXMLDataType

```ts
type ExcelOOXMLDataType =
    'str'       |
    's'         |
    'f'         |
    'inlineStr' |
    'n'         |
    'b'         |
    'd'         |
    'e'         |
    'empty'
```
