Does jqgrid support exporting to excel “ out of the box” or do i need to write some server side code?

前端 未结 4 1249
忘了有多久
忘了有多久 2021-01-14 14:56

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 abou

4条回答
  •  囚心锁ツ
    2021-01-14 15:36

    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.

提交回复
热议问题