Click here to Skip to main content
15,915,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i'm trying to export html table to excel using the table2excel plugin. After following through different examples on the site, its giving me an error when i debug it. it says table2excel is not a function. i want to know why i'm receiving the table2excel is not a function when i have the plugin referenced in my application.

What I have tried:

JavaScript
$(document).ready(function () {
         $("#Export").click (function () {
            $("#tblReport").table2excel({ 
                 exclude: ".noExl",
                name: "Results",
                filename: "Total Cost Analysis Report",
                fileext: ".xls",
                 });
        });
});
Posted
Updated 13-Dec-16 22:43pm
v2

1 solution

Make sure the script reference for your plug-in is after the jQuery one, and also check both are included before your js code.
 
Share this answer
 
Comments
Mcbaloo 14-Dec-16 5:02am    
Thanks man!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900