Export HTML table to Excel file
<p>I've been looking into some jQuery plugins that are capable of doing this.  I decided to use the one at <a href="http://www.jqueryscript.net/table/Export-Html-Table-To-Excel-Spreadsheet-using-jQuery-table2excel.html" rel="nofollow">http://www.jqueryscript.net/table/Export-Html-Table-To-Excel-Spreadsheet-using-jQuery-table2excel.html</a> and I've followed its instructions as closely as possible.  I've been testing this plugin but every time I click the button to export, nothing happens.  The table is populated using PHP (which is pulling data from a MySQL server) and the following is the script I currently have in place.</p>

<pre><code>&lt;script&gt;
        $(document).ready(function() {

                //activate footable jquery plugin (this is the dynamic table on the report page with search and sorting functions)
                $('.footable').footable();


        });

        //Prepare table2excel plugin (clicking the export button will send the main table to an Excel spreadsheet)
        $("button").click(function(){
            $(".footable").table2excel({
                //Exclude CSS class specific to this plugin
                exclude: ".noExl",
                name: "Excel Document Name"
            });
        });

&lt;/script&gt;
</code></pre>

<p>The <code>footable</code> display hasn't changed at all after I added the new code.  What can I do?  I keep thinking I've just misplaced the table2excel block but even when I had it inside the <code>ready(function(){})</code> block, nothing happened.</p>