$(document).ready(function() { $("table").DataTable({ 'pageLength': 50, 'dom': 'Bfrtlip', 'buttons': [ 'copy', 'csv', 'excel' ] }) });