views:

121

answers:

1

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 excel.

I have an asp.net mvc site and i have always done this on the server side to generate an excel file.

Is this now possible out of the box from jqgrid. Are there any examples of how this works?

+2  A: 

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 http://stackoverflow.com/questions/1012547/creating-excel-document-with-openxml-sdk-2-0, http://stackoverflow.com/questions/2682208/how-to-export-asp-net-mvc-detail-view-data-to-an-excel-file/2682324#2682324 or http://stackoverflow.com/questions/2595489/strategy-in-exporting-to-excel-with-formatting-from-asp-net/2917139#2917139). Usage of Open XML SDK 2.0 gives you the most flexibility and you can produce a perfect Excel file which you need.

Oleg
@Oleg - i want to do this in javascript (not PHP version)
ooo
therefore this feature of jqGrid is not really relevant for you and I recommended you to use Open XML SDK 2.0 or stay on other method which you currently you on the server side.
Oleg
Do you really want to create Excel document IN JAVASCRIPT??? It would be masochistic.
Oleg
@Oleg - agree with you point but i have a lot of cases where i dont care about formatting extra and want a quick way to export the data to excel and it seemed from the release notes that jqgrid supported it out of the box.
ooo
Oleg