Good morning, I am creating two tables in the same html file only in different tabs, in each table headings are handled and an export button to excel, the problem that generates me is that when exporting the tables, only the button of the first table works for me, the second one is created but it does not perform the function ... I present my code and hope that someone can help me ...
This is the script to add properties to the table
<script> // tabla 1
$(document).on('ready', function(){
$("#datosConciliacionSinFactura").dataTable({
"sPaginationType": "bootstrap",
dom: 'T<"clear">lfrtip',
tableTools: {
aButtons: [{
"sExtends": "xls",
"sButtonText": "Exporta a Excel",
}]
},
"aLengthMenu": [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "Todo"]
],
});
});
</script>
<script> //tabla 2
$(document).on('ready', function(){
$("#datos_Conciliacion").dataTable({
"sPaginationType": "bootstrap",
dom: 'T<"clear">lfrtip',
tableTools: {
aButtons: [{
"sExtends": "xls",
"sButtonText": "Exporta a Excel",
}]
},
"aLengthMenu": [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "Todo"]
],
});
});
</script>
With this I send him to call my tables
<table id="datos_Conciliacion" class="table table-striped table-bordered table-condensed">
.......
</table>
<table id="datosConciliacionSinFactura" class="table table-striped table-bordered table-condensed">
.....
</table>
As I repeat, my problem is when I click on the button, the one in the first table if it works and the one in the second table does not perform the function ...