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

export functionality for ejgrid

currently i am using ejGrid in angularjs and trying to export data into excel,word and pdf formats 
.i used the sample code given in demos,but i was getting NullReferenceException error as shown below

An error has occurred.Object reference not set to an instance of an object.System.NullReferenceException   at Syncfusion.EJ.Export.GridExcelExport.ProcessRecordCell(Object row, Column column)
   at Syncfusion.EJ.Export.GridExcelExport.<>c__DisplayClasse.<ProcessRecordRow>b__d(Column column)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Syncfusion.EJ.Export.GridExcelExport.ProcessRecordRow(Object row)
   at Syncfusion.EJ.Export.GridExcelExport.RenderRecord()
   at Syncfusion.EJ.Export.GridExcelExport.ProcessGridContents()
   at Syncfusion.EJ.Export.GridExcelExport.IterateElements()
   at Syncfusion.EJ.Export.GridExcelExport.ExportHandler()
   at Syncfusion.EJ.Export.GridExcelExport.ExecuteResult(GridProperties GridModel, IEnumerable dataSource)
   at Syncfusion.EJ.Export.GridExcelExport.Export(GridProperties gridModel, IEnumerable dataSource, Boolean multipleExport)
   at Syncfusion.EJ.Export.ExcelExport.Export(GridProperties gridmaodel, IEnumerable datasource, String excelname, ExcelVersion excelversion, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, String theme)
   at Northwind.JSGridExportController.ExcelExport() in f:\EssentialStudio\\JS\ExportingServices\Northwind\JSGridExportController.cs:line 33
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassf.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)

please help me with this

1 Reply

SR Sellappandi Ramu Syncfusion Team March 16, 2015 12:12 PM UTC

Hi Subash,

Thanks for using Syncfusion products.

We have tested the reported issue in our end, and issue is reproduced when the referred dll’s are different versions or the grid columns is different from the data source columns. So we request you to check the following details in your project.

1. Syncfusion.EJ.Export dll version is same in to Syncfusion.EJ.

2. The all grid column name is defined in data source column.

Please check the above information to resolve the issue, still if you face the same issue. Kindly provide us the sample along with the replication procedure.


Sellappandi R

Live Chat Icon For mobile
Up arrow icon