Core Features

Advanced Features

React Data GridExcel Export - Notes

Enterprise

Excel notes/comments can be added to exported cells using a callback, exported automatically from the Notes feature, or attached to custom content rows.

Adding Notes to Cells Copy Link

Use processNoteCallback to inject notes during export. The callback is invoked for each exported cell and receives the cell value, column, and row node. Return an ExcelNote object to attach a note, undefined to keep the default behaviour, or null to suppress the note for the current cell.

If a note does not specify an author, the Excel document author is used. When the document author is not provided, the exporter falls back to AG Grid.

Exporting Grid Notes Copy Link

When the Notes feature is enabled and notesDataSource is configured, cell notes are exported automatically as Excel notes/comments. No callback is needed.

Suppressing Grid Notes Copy Link

Set suppressGridNotesExport to true to prevent grid notes from being included in the export. The grid still displays notes, but the exported file will not contain them. Callback-based note injection via processNoteCallback still works when this is set.

Hiding Author Copy Link

By default, the author name is prepended as bold text in the Excel note body (matching Excel's native behaviour). Set suppressPrependAuthorToNotes to true to export only the note text. The author is still stored in the Excel workbook's note metadata.

Customising Exported Notes Copy Link

When both the Notes feature and processNoteCallback are used together, the callback receives params.gridNote (the original grid note) and params.defaultNote (the auto-derived Excel note). This allows you to:

  • enhance the default note text with extra metadata
  • override or preserve the note author
  • inject export-only notes for cells that do not have a grid note
  • suppress the note for a specific cell by returning null

Use ExcelCell.note on prependContent, appendContent, or getCustomContentBelowRow to attach notes to custom content rows outside the grid body.

API Copy Link

ExcelNote Copy Link

Properties available on the ExcelNote interface.

See Notes for more information.

text requiredCopy Link
string
The body text to export in the Excel note/comment.
authorCopy Link
string
Optional author name displayed in the exported Excel note. When omitted, the document author is used.

ProcessNoteForExportParams Copy Link

Properties available on the ProcessNoteForExportParams<TData = any, TContext = any> interface.

See Notes for more information.

gridNoteCopy Link
Note
The grid note resolved for the current cell, when the Notes feature is available.
defaultNoteCopy Link
ExcelNote
The default Excel note/comment derived from gridNote when automatic note export is enabled.
any
any
accumulatedRowIndexCopy Link
number
number
IRowNode | null
Column
string
string
parseValueCopy Link
Function
Utility function to parse a value using the column's colDef.valueParser
formatValueCopy Link
Function
Utility function to format a value using the column's colDef.valueFormatter
The grid api.
Application context as set on gridOptions.context.