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

Grid Excel Export not working in server


My grid excel export function is not working in server.

Sourabh Acooli

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 13, 2017 12:58 PM UTC

Hi Sourabh, 
Thanks for contacting syncfusion support. 
We are unable to reproduce your reported problem “excel exporting not working ” at our end. We have created sample according to your requirement “Excel Exporting with server side” which can be downloaded from the below location.  

Please refer to the code snippet 

<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True"  OnServerWordExporting="FlatGrid_ServerWordExporting" OnServerPdfExporting="FlatGrid_ServerPdfExporting" OnServerExcelExporting="FlatGrid_ServerExcelExporting" > 
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings> 
 <ToolbarSettings ShowToolbar="true" ToolbarItems="excelExport,wordExport,pdfExport"></ToolbarSettings>   
                <ej:Column Field="OrderID" HeaderText="Order ID" Width="90" /> 
                <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="85"/> 
                <ej:Column Field="EmployeeID" HeaderText="Employee ID" Width="70"/> 
                <ej:Column Field="ShipCity" HeaderText="Ship City" Width="80" /> 
                <ej:Column Field="Freight" HeaderText="Freight" Format="{0:C}" Width="80"/> 
Server side:- 
// Excel Exporting 
protected void FlatGrid_ServerExcelExporting(object sender, Syncfusion.JavaScript.Web.GridEventArgs e) 
             ExcelExport exp = new ExcelExport(); 
             exp.Export(FlatGrid.Model, (IEnumerable)FlatGrid.DataSource, "Export.xlsx", ExcelVersion.Excel2010, true, true, "flat-lime"); 
// Word Exporting 
  protected void FlatGrid_ServerWordExporting(object sender, Syncfusion.JavaScript.Web.GridEventArgs e) 
            WordExport exp = new WordExport(); 
           exp.Export(FlatGrid.Model, (IEnumerable)FlatGrid.DataSource, "Export.docx", true, true, "flat-lime"); 
// Pdf Exporting 
protected void FlatGrid_ServerPdfExporting(object sender, Syncfusion.JavaScript.Web.GridEventArgs e) 
           PdfExport exp = new PdfExport(); 
           exp.Export(FlatGrid.Model, (IEnumerable)FlatGrid.DataSource, "Export.pdf", true, true, "flat-lime"); 


Please refer to the help documentation and online Demo links:- 

Also please check “ej.webform.min” file has been included in your sample and referred properly. Because server side operations was handled by this file only. We have already created KB when serverside events non-triggered, Please refer to the kb link 

After following the above code example and sample, Still have you faced any difficulties could you please share us the following details to find the cause of the issue. 

1. Share us the Grid code example(Both at client and server side). 

2. Screenshot/Video regarding that issue.  

3. Replication procedure of the issue. 

4. If possible, replicate the issue in the above sample and send us back. 

5. Product version details. 

The provided details will helps us to analyze and provide you solution as early as possible.  


Farveen sulthana T 

Live Chat Icon For mobile
Up arrow icon