Correct way to use table tools? Can't get the save as excel or pdf button pane to appear

Correct way to use table tools? Can't get the save as excel or pdf button pane to appear

chaithuzz2chaithuzz2 Posts: 1Questions: 1Answers: 0

Hi,

First of all, thanks for this great extension to data tables. I want to have the option of saving tables as an excel and pdf file. I tried doing it as it says in documentation. But somehow it's not working. My code is below. I have data tables folder in my project directory

Src includes

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.css">
        <link href="css/styles.css" rel="stylesheet">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.6/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/plug-ins/1.10.6/integration/bootstrap/3/dataTables.bootstrap.js">
    </script>
    <link rel="stylesheet" type="text/css" href="DataTables-1.10.7/extensions/TableTools/css/dataTables.tableTools.min.css">
    <script type="text/javascript" src="DataTables-1.10.7/extensions/TableTools/js/dataTables.tableTools.min.js"></script>

Syntax of dataTable initialization

$('#main_table').dataTable({
            "iDisplayLength": 50,
            "order" : [[0,"desc"]],
            "Dom": 'T<"clear">lfrtip',
            "tableTools": {
            "sSwfPath": "../swf/copy_csv_xls_pdf.swf"
            } 
});

When I do this, there is no button container appearing that allows us to save table as different formats. The following is a link to the code repository.

https://github.com/chaithuzz2/tableToolsSample

Please tell me how to solve this. Thanks for your help.

This discussion has been closed.