How to export three database tables into one single sheet using datatables?

The website is in Php. I am using datatables.net to export my database table. But, it works fine for one table. But, I have three tables on a web page. How can I export all those three tables into one sheet? Please help.

Script:

<script>
$(document).ready(function() {
    $('#table1').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    } );
} );


</script>