Skip to content Skip to sidebar Skip to footer

Does Jqgrid Support Exporting To Excel " Out Of The Box" Or Do I Need To Write Some Server Side Code?

on this page in the release notes of jqgrid 3.7.2, i see: Fix export url in export to excel method but i dont see any other documention about jqgrid natively supporting export to e

Solution 1:

There are method excelExport in grid.import.js which do not really much. The function is not described on http://www.trirand.com/jqgridwiki/doku.php?id=wiki:import_methods but you can look at http://www.trirand.com/blog/?page_id=393/help/exceltrue-not-working-for-me/ to have a feeling how it work.

I also use ASP.NET MVC and WCF and make export to excel on the server side with respect of Open XML SDK 2.0 (see Creating Excel document with OpenXml sdk 2.0, how to export asp.net MVC detail view data to an excel file? or Strategy in exporting to Excel with formatting from ASP.NET?). Usage of Open XML SDK 2.0 gives you the most flexibility and you can produce a perfect Excel file which you need.

UPDATED: The answer provides demo project which shows how to implement the approach.

Solution 2:

See Calling Excel Export from a custom button (javascript):

Once again - the open source lib does not contain a method to make a excel file, buyt only a method to call a already constructed one.

Please download the jqGrid PHP wrapper from here: http://www.trirand.net/download.aspx

Read the install instructions here : http://www.trirand.net/documentation/php/_2v20f82ru.htm

and and do a demo described here: http://www.trirand.net/documentation/php/_2v212tis2.htm

in order to have the build in export to excel

Solution 3:

There are few other paid alternates that supports export to excel, csv and pdf

PHP Grid Control http://www.phpgrid.org

Instant PHP Grid http://www.phpgrid.com

Solution 4:

Here's a walkthrough of how to add an "Export to Excel" button to your jqGrid, which will write to a real Excel file.

http://www.codeproject.com/Articles/784342/Export-data-from-jqGrid-into-a-real-Excel-file

enter image description here

(Note that this only works if you're using Visual Studio, as it uses the Microsoft OpenXML libraries.)

Post a Comment for "Does Jqgrid Support Exporting To Excel " Out Of The Box" Or Do I Need To Write Some Server Side Code?"