Export to excel

Hi

When I export a grid to excel, it fails for
Uncaught (in promise) TypeError: txt[0] is undefined
    getAggreateValue excel-export.js:720
    fillAggregates excel-export.js:616
    processAggregates excel-export.js:590
    processRecordContent excel-export.js:367
    processGridExport excel-export.js:341
    processInnerRecords excel-export.js:229
    processInnerRecords excel-export.js:227
    processRecords excel-export.js:154

The specific location of the failure is here:
ExcelExport.prototype.getAggreateValue = function (cellType, template, cell, row) {
        var templateFn = {};
        templateFn[getEnumValue(CellType, cell.cellType)] = compile(template);
        /* tslint:disable-next-line:max-line-length */
        var txt = (templateFn[getEnumValue(CellType, cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName]));
        return txt[0].textContent; <<<<<<<<<<<<<<<<<<<<<<<<
    };

Because txt length is 0, it fails on udefined. Not sure if it's data related or a bug so I will try to write as much info as I can. The failure is of column X and that column has an agg function.

<e-column type="Count" field="X" :footerTemplate="footerCount"></e-column>

            footerCount() {
                return {
                    template: Vue.component("Count", {
                        template: "<span>{{data.Count}} assets</span>",
                        data() {
                            return {
                                data: {},
                            };
                        },
                    }),
                };
            },

Let me know if more data is needed.
Thanks


3 Replies

VS Vignesh Sivagnanam Syncfusion Team November 3, 2020 12:17 PM UTC

Hi Amos 

Thanks for contacting Syncfusion support 

We are able to reproduce the reported problem at our end. We have already confirmed it as a bug and logged the defect report “Script error throws while exporting grid component with aggregates in Vue”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming  weekly release which is expected to be rolled out on 11th November, 2020.  
     
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.     
     
     
Until then we appreciate your patience.      
  
Regards,  
Vignesh Sivagnanam 



AM Amos November 3, 2020 01:05 PM UTC

Thanks but I get access is denied :)


TS Thiyagu Subramani Syncfusion Team November 4, 2020 11:33 AM UTC

Hi Amos, 

Thanks for your update and sorry for the inconvenienced. 

Based on your reported information we have modified our reported feedback. Please check it now. If still facing the issue (access is denied), please share image view of your issue. 

Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S 


Loader.
Up arrow icon