In your JS File add this option to your datatable:
buttons: [ 'excel', 'pdf', 'copy' ]
It will look like:
$('#yourTableID').DataTable({
buttons: [ 'excel', 'pdf', 'copy' ]
});
Add the necessary css files for the datatable with the buttons:
<link rel="stylesheet" type=&quo...