We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error in Excel Export


I was trying to test Excel export in grid component, my project it's made in Angular 7.

I`ve used the following link:

When I click on export button, I received the following error en console:

core.js:15724 ERROR Error: Uncaught (in promise): TypeError: this.sharedString[i].startsWith is not a function
TypeError: this.sharedString[i].startsWith is not a function
    at Workbook.push../node_modules/@syncfusion/ej2-excel-export/src/workbook.js.Workbook.saveSharedString (workbook.js:1238)
    at Workbook.push../node_modules/@syncfusion/ej2-excel-export/src/workbook.js.Workbook.saveInternal (workbook.js:1048)
    at Workbook.push../node_modules/@syncfusion/ej2-excel-export/src/workbook.js.Workbook.save (workbook.js:1033)
    at excel-export.js:263
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
    at Object.onInvoke (core.js:17299)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
    at zone.js:872
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at resolvePromise (zone.js:814)
    at resolvePromise (zone.js:771)
    at zone.js:873
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:17290)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:500)
    at ZoneTask.invoke (zone.js:485)

What I missing or doing wrong?

1 Reply

PS Pavithra Subramaniyam Syncfusion Team September 5, 2019 03:36 AM

Hi Drio, 
Greetings from Syncfusion. 
Query: Error in Excel Export 
We have validated your query and try to reproduce the reported problem by creating sample based on your requirement. It works(Excel exporting) fine at our end. Please find the below sample for your reference. 
If you are still facing the same problem, could you please share the below information. It will be helpful to provide a better solution. 
  • Share full grid code snippets.
  • Share your data model(dataSource) details.
  • Share the Syncfusion version details.

Pavithra S. 

Live Chat Icon For mobile
Up arrow icon