Excel Button not working/showing

Excel Button not working/showing

MichaelECMichaelEC Posts: 23Questions: 9Answers: 0

Hi,

Not sure why this isn't working - my only error I get is 'Uncaught Unknown button type: copyHtml5'

Here is my scripts I include:

<script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/rowgroup/1.1.1/js/dataTables.rowGroup.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.1/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.1/js/dataTables.buttons.min.js"></script>

Here is my table code:

  table = $('#tbl_staff_details_wages').DataTable( {
      order: [[2, 'desc']],
           scrollX:        true,
           scrollCollapse: true,
           paging: false,
                     "bInfo" : false,
       "bFilter" : false,
        "responsive" : true,
      "iDisplayLength": 50,
                autowidth: false,
                "language": {
                    "sZeroRecords": "None"
                },
                dom: 'Bfrtip',
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5'
        ]
      })

      });

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    If you look at this example here, ensure you have the necessary files listed on the Javascript and CSS tabs beneath the table.

    If that doesn't help, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.