The PivotGrid allows you to customize a header and a footer in the exported Excel file. The ExcelJS library allows you to customize worksheets outside of exported cell regions. This, in turns, allows you to add a header (a title before exported data) and a footer (a note after exported data). Follow the steps below to configure a header/footer:
In the onExporting event handler, call the exportPivotGrid(options) method.
Enable one or multiple options to export headers of the fields in the field panel:
Execute a promise after the exportPivotGrid(options) method. In this promise, specify the position, appearance, and content of the header/footer. The functions used to generate header and footer sections utilize the following PivotGrid customization features:
Cell values formatting
Text alignment