Reputation: 99
hello there guys I have a question this might be newbie question
I have a datatable in my website now I want to print or export it in excel file the problem I am getting is that the tag <tfoot></tfoot>
was not included in printing and in export
this are my code:
JS:
<script type="text/javascript" class="init">
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{
extend: 'print',
customize: function ( win ) {
$(win.document.body)
.css( 'font-size', '10pt' )
.prepend(
'<img src="http://datatables.net/media/images/logo-fade.png" style="position:absolute; top:0; left:0;" />'
);
$(win.document.body).find( 'table' )
.addClass( 'compact' )
.css( 'font-size', 'inherit' );
}
}
]
} );
} );
</script>
Upvotes: 0
Views: 72
Reputation: 2910
You can add footer: true
option.
// ...
extend: 'print',
footer: true,
// ...
For more information, take a look here.
Upvotes: 1