Export Grid to Excel with JQuery

Using Table2Excel


Grab the Javascript Table2Excel and make sure you have a reference to a recent Jquery library

https://rawgit.com/unconditional/jquery-table2excel/master/src/jquery.table2excel.js

Create a button click or other event

$("#myButton").click(function(){

 $("#myGridorTable").table2excel({
            exclude: ".noExl",
            name: "MyExcel.xls"
        });
};


There you go - button click - excel returned as a file to the browser.

Comments

Popular posts from this blog

Linq Exclude from separate list

Sorting Ascending and Descending

Linq Query Syntax vs Method Syntax