AG-grid export to excel with group count

Viewed 407

When exporting a grid with groups which have group count with it. The exported excel doesn't contain the group count. Is there a way to export with the group count?

enter image description here

1 Answers

You can easily do that by modifying the group header content in processRowGroupCallback. Here is all of the export options for reference.

gridApi.exportDataAsExcel({
  processRowGroupCallback: (params) => {
    const { node } = params;
    return `${node.key} (${node.allChildrenCount})`;
  }
});

Live Example

Edit 64085383/ag-grid-export-to-excel-with-group-count/64086323#64086323

Related