jquery - Datatables export additional text -
i have requirement add additional text table excel (and pdf) export. it's string in model containing information parameters used run report. using datatables , here code snippet document ready function:
$('#npsoverallsummarytable').datatable({ "aasorting": [], "scrollx": true, "colreorder": true, "fixedheader": true, "searching": false, "paging": false, select: true, dom: 'bfrt', buttons: [ { extend: 'copy', text: 'copy clipboard' }, { extend: 'excel', text: 'excel' }, { extend: 'pdf', text: 'pdf', orientation: 'landscape', pagesize: 'a3' }, 'colvis' ], "columns": [ null, { classname: "text-right" }, { classname: "text-right" }, { classname: "text-right" }, { classname: "text-right" }, { classname: "text-right" } ] });
so far had idea utilize table footer not using right now, when placed 1 element colspan="6", on excel export got text 6 times (once in each cell) not i'm looking for. tried put in normal element inside footer messes formatting extends column width length of text.
i guess looking nice , clean way include information in excel/pdf export. mention, website mvc .net bootstrap if that's relevant @ here. appreciated.
edit: have condensed required information , placed file name of export, i'm still on lookout if there better solution out there.
Comments
Post a Comment