bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Add cell formatting + filtering to Grid Excel Export #6089

Closed marciogurka closed 1 month ago

marciogurka commented 1 year ago

Forum post

"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" Basic styling example

bmblb commented 1 year ago

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.

ghulamghousdev commented 5 months ago

+1 here: https://forum.bryntum.com/viewtopic.php?p=145477#p145477

matsbryntse commented 5 months ago

Possible option: https://classic.yarnpkg.com/en/package/write-excel-file

ghulamghousdev commented 5 months ago

Another request: https://forum.bryntum.com/viewtopic.php?p=146368#p146368