jqgrid是否支持导出为ex​​cel“开箱即用“或者我需要编写一些服务器端代码? [英] Does jqgrid support exporting to excel " out of the box" or do i need to write some server side code?

查看:114
本文介绍了jqgrid是否支持导出为ex​​cel“开箱即用“或者我需要编写一些服务器端代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此页面 jqgrid 3.7.2的发行说明,我看到:

on this page in the release notes of jqgrid 3.7.2, i see:

修复导出为ex​​cel方法的导出URL

但是我没有看到关于jqgrid的任何其他文档原生支持导出到excel。

but i dont see any other documention about jqgrid natively supporting export to excel.

我有一个asp.net mvc网站,我一直做这在服务器端生成一个excel文件。

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

现在可以从jqgrid开箱即可。有没有一个例子,这是如何工作的?

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

推荐答案

有方法 excelExport grid.import.js 中,这不是太多。该功能在 http://www.trirand.com/ jqgridwiki / doku.php?id = wiki:import_methods ,但您可以查看 http://www.trirand.com/blog/?page_id=393/help/exceltrue-not-working-for-me/ 有感觉如何它的工作。

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.

我还使用ASP.NET MVC和WCF,并在服务器端导出到关于Open XML SDK 2.0(参见使用OpenXml sdk 2.0创建Excel文档如何将asp.net MVC详细视图数据导出到一个excel文件?通过ASP.NET格式导出到Excel的策略)。 Open XML SDK 2.0的使用使您具有最大的灵活性,您可以生成一个完美的Excel文件,您需要。

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.

这篇关于jqgrid是否支持导出为ex​​cel“开箱即用“或者我需要编写一些服务器端代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆