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
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to export grid data to Excel, Word and PDF formats on external action

Platform: jQuery |
Control: ejGrid

The Grid data export can be done externally using the “export” public method of the Grid. The export method will take three parameter such as URL to the export method, Server event name which is used in web forms and a third Boolean parameter to enable multiple grid export.

In the below, we have explained how to use the export method out of the grid to export the grid data. We have exported the grid data on button click.

The Grid initialization will be as follows.







The client side click event of the button in which we have invoked export operation is as follows.


We have used the Web API controller to perform the export operation and we can also MVC controllers or ASP.Net web methods to perform export. The Web API controller used is as follows.


The output will be as follows.

Figure 1: Grid with external button to perform export data.

Figure 2: Exported Excel file.

You must log in to leave a comment
Surentslkajd Surentslkajd
Jul 07, 2015
I want to export to excel with date formatting. col.Field("DateCreated").HeaderText(appstrings.Date).Width(0).AllowFiltering(false).Format("{0:MM/dd/yyyy hh:mm:ss tt z}").Add(); I am able to see date time in PDF but not in Excel(showing only date) . what kind of changes need to see date time and zone in excel? Reply
Andrew Wing
Feb 17, 2016
useless. Reply
Xavier Reyes
May 18, 2018

it's posible with PHP?


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile