support
support copied to clipboard
Add cell formatting + filtering to Grid Excel Export
"Hello,
We are attempting to add header styling and filtering to the exported .xlsx.
Looking through the export demo and API documentation, it is not clear if this can be done and if so what configuration is required.
Demo: https://bryntum.com/products/grid/examples/exporttoexcel/ API Docs: Grid.feature.experimental.ExcelExporter
toolbar.push(
{
type: 'button',
text: (window as any).Mpro.LanguageService.translate('page.shared.button.exportBtn'),
listeners: {
action: async () => {
if (this.enableExcelExport) {
await this.grid.features.excelExporter.export({
filename: this.excelExportFileName,
dateFormat: 'DD/MM/YYYY HH:mm:ss',
});
}
},
thisObj: this.grid,
},
}
);
Thanks"
For export we use #egeriis/zipcels library which does not allow styling by design. It should be possible with other libraries though. I suppose it should be possible to replace zipcelx library with a config to another library that supports styling. Exporter should be updated too, to allow functions to return column configs.
+1 here: https://forum.bryntum.com/viewtopic.php?p=145477#p145477
Possible option: https://classic.yarnpkg.com/en/package/write-excel-file
Another request: https://forum.bryntum.com/viewtopic.php?p=146368#p146368