Export to excel with totals

Why is the total row exported to excel one cell left?
Like this:

This is the grid:


Excel export:

let gridObj = document.getElementById("grid").ej2_instances[0];

let datumOd = document.getElementById("cboxDatumOd").ej2_instances[0];

let datumDo = document.getElementById("cboxDatumDo").ej2_instances[0];


let filter = ejs.data.DataUtil.select(this.filterSettings.columns, ['field', 'value']), str = "";

        for (var f = 0; f < filter.length; f++) {

            str = str + filter[f].field + ": " + filter[f].value;

            str = str + ((f + 1) === filter.length ? "" : " | ");

        }

if (args.item.id === 'grid_excelexport') {


 let excelExportProperties = {

                header: {

                    headerRows: 4,

                    rows: [

                        { cells: [{ colSpan: 1, value: "Razdoblje: " + datumOd.value.toLocaleDateString("hr-HR").replace(" ", "") + " - " + datumDo.value.toLocaleDateString("hr-HR").replace(" ", ""), style: { fontSize: 14, hAlign: 'Left', bold: false, } }] },

                        { cells: [{ colSpan: 1, value: str, style: { fontSize: 12, hAlign: 'Left', bold: false, } }] },

{ cells: [{ colSpan: 1, value: "Vrijeme: " + new Date().toLocaleString("hr-HR"), style: { fontSize: 12, hAlign: 'Left', bold: false, } }] },

                    ]

                },

            };

gridObj.excelExport(excelExportProperties);

}


Thanks!


2 Replies

JC Joseph Christ Nithin Issack Syncfusion Team November 17, 2021 02:02 PM UTC

HI Bernard,

 Greetings from Syncfusion support.

  Currently we are validating the reported issue from our side. We will provide  further details on 19th November 2021. We appreciate your patience  until then.

Regards,
Joseph I



PS Pavithra Subramaniyam Syncfusion Team November 19, 2021 03:16 PM UTC

Hi Bernard, 

Thanks for your patience. 

We have tried to reproduce the reported scenario at our end, but the aggregate is working fine in the exported excel file. Please refer to the below sample link for more information. 


For further validation we need some more details that will be helpful for us to provide a better solution. 

  1. Share the Syncfusion dll version
  2. Share your ej2.min.js file version
  3. Are you facing any script error while exporting?
  4. Please reproduce the issue in the given sample or share any sample with issue if possible

Regards, 
Pavithra S 


Loader.
Up arrow icon