Datatables csv / excel export button not appearing

Hi folks,

Tried hard and hard. no luck. wasted an entire day on google.
my data table buttons only showing print and pagelength, but not excel or csv.

declarations :slight_smile:

<!--Data Table Declarations-->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.1/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/tabletools/2.2.4/css/dataTables.tableTools.min.css">


<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>


<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.print.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<script src="https://cdn.datatables.net/tabletools/2.2.4/js/dataTables.tableTools.min.js"></script>
<!--/Data Table Declarations-->

code :slight_smile:


<script>
$(document).ready(function() {
    $('#example').DataTable( {
        "dom": 'Bfrtip',
		"buttons": ['csv', 'excel', 'pdf', 'print','excel','pageLength'], 	
		"pageLength": 100,
		"processing": false,
        "sAjaxSource":"data.php",		
    });
});

</script>

AwesomeScreenshot-Ubaid-Auto-System-Admin-Panel-2019-07-19-18-07-10

well for starters you’ve put excel in your array twice.

I’m somewhat confused, as it feels like you’re loading entirely too many javascript files, from different versions of the buttons …
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js">
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.print.js"
Do these scripts not clash with each other? Which one are you SUPPOSED to be loading?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.