React Grid with aggregates throwing exception when exporting to excel

If I try to export a react grid with aggregates to excel or csv I am getting the error below:
excel-export.js:754 Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of null
at ExcelExport.aggregateStyle (excel-export.js:754)
at ExcelExport.fillAggregates (excel-export.js:697)
at ExcelExport.processAggregates (excel-export.js:629)
at ExcelExport.processRecordContent (excel-export.js:379)
at ExcelExport.processGridExport (excel-export.js:353)
at excel-export.js:232
at new Promise ()
at ExcelExport.processInnerRecords (excel-export.js:230)
at excel-export.js:156

3 Replies

RS Rajapandiyan Settu Syncfusion Team May 3, 2021 09:38 AM UTC

Hi Isheanesu, 
 
Thanks for contacting Syncfusion support. 
 
Query: If I try to export a react grid with aggregates to excel or csv I am getting the error below: 
excel-export.js:754 Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of null 
 
We are tried to reproduce the reported behavior, but it was unsuccessful at our end. The EJ2 Grid exported properly with the aggregate values, please find the below sample for your reference. 
 
 
So, please share the below details to replicate your reported behavior at our end. 
 
  1. Share the complete Grid code you have used.
  2. Share the package.json file with us.
  3. Did you applied any customization on aggregate cell?
  4. If possible, share the simple issue reproducible sample or try to make the issue in given sample.
 
Regards, 
Rajapandiyan S 



GA Ganesh December 6, 2021 07:19 AM UTC

There is a error if the columns are grouped and also there is an aggregate, without grouping and only aggregate there is no error while exporting to excel or csv. There is no error while exporting to pdf in both cases.



RR Rajapandi Ravi Syncfusion Team December 7, 2021 04:10 PM UTC

Hi Ganesh, 

Thanks for the update 

From your update we could see that you are facing a problem while excel export if the columns are grouped and also there is an aggregate. Based on your query we have prepared a sample and tried to reproduce your reported problem, but it was unsuccessful. The Excel export was working fine along with Grouped column and aggregate. Please refer the below sample for more information. 


If you still face the issue, please share the below details to replicate your reported behavior at our end. 

1)     Share the complete Grid code you have used. 
2)     Share the package.json file with us. 
3)     Did you apply any customization on aggregate cell? 
4)     If possible, share the simple issue reproducible sample or try to make the issue in given sample. 

Regards, 
Rajapandi R 


Loader.
Up arrow icon