How to use buttons like excel ,print on Multiple tables
How to use buttons like excel ,print on Multiple tables
sainix
Posts: 13Questions: 6Answers: 0
i m using two datatable on same page but buttons not work fine if we use two tables
$(document).ready(function () {
var table = $('table.display').dataTable({
"pageLength": 100,
"bSort": false
});
var tableTools = new $.fn.dataTable.TableTools(table, {
'aButtons': [
{
'sExtends': 'print',
'bShowAll': true,
},
{
'sExtends': 'xls',
'sButtonText': 'Save to Excel',
'sFileName': 'Report.xls'
},
{
'sExtends': 'pdf',
'bFooter': false
},
],
'sSwfPath': '//cdn.datatables.net/tabletools/2.2.4/swf/copy_csv_xls_pdf.swf'
});
$(tableTools.fnContainer()).insertBefore('#table-demo_wrapper');
});
This discussion has been closed.
Answers
There is no option to have Buttons export data from two different tables in a single file I'm afraid. That is not a feature that Buttons currently offers.
Allan