I want to format certain cell values when right clicking the grid and choosing Export to Excel. I assume I'm going to use the processCellCallback function but how do I call it or override it?
I found the export function here this.gridOptions.api.exportDataAsExcel but I'm not sure how to connect the two, and I can't find any good examples at the ag-grid documentation.
This is what I've tried:
this.gridOptions = <GridOptions>{
columnDefs: [{
// Here are my column definitions
}],
processCellCallback: function (params) {
console.log(params)
if (params.column.getColId() === 'Created' && params.value) {
return this.toDateTime(params.value);
} else {
return params.value;
}
}
}