如何在.net中使用jQuery导出excel,pdf的动态数据表 [英] how to do dynamic data table to export excel , pdf using jQuery in .net
本文介绍了如何在.net中使用jQuery导出excel,pdf的动态数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何动态数据表导出excel,pdf在.net中使用jQuery
函数ExportExcel(){
$( #btnExportExcel)。点击(功能(e){
window.open('data:application / vnd.ms-
how to do dynamic data table to export excel , pdf using jQuery in .net
function ExportExcel() {
$("#btnExportExcel").click(function (e) {
window.open('data:application/vnd.ms-
推荐答案
(#btnExportExcel)。点击(function(e){
window.open('data: application / vnd.ms-
("#btnExportExcel").click(function (e) {
window.open('data:application/vnd.ms-
首先你必须以json或者json的形式检索数据表xml客户端使用ajax。
之后使用它..
first of all you have to retrive datatable in form of json or xml an client side using ajax.
after that use this..
window.open('data:application/vnd.ms-excel,' + your data(in json or xml format));
另一种方法是根据你的数据格式创建html表e(隐藏)。
Another way create html table as per your datatable formate (hidden).
window.open('data:application/vnd.ms-excel,' +
( ' #yourDivData')。html());
('#yourDivData').html());
这篇关于如何在.net中使用jQuery导出excel,pdf的动态数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文