In this article I will explain with an example, how to export ASP.Net Table to Excel file using jQuery.
The ASP.Net Table will be exported (converted) to Excel file using the jQuery table2excel plugin.
HTML Markup
The HTML Markup consists of an ASP.Net Table and an ASP.Net Button.
<asp:Table ID="tblCustomers" runat="server">
        <asp:TableHeaderCell>Customer Id</asp:TableHeaderCell>
        <asp:TableCell>John Hammond</asp:TableCell>
        <asp:TableCell>United States</asp:TableCell>
        <asp:TableCell>Mudassar Khan</asp:TableCell>
        <asp:TableCell>Suzanne Mathews</asp:TableCell>
        <asp:TableCell>Robert Schidner</asp:TableCell>
<asp:Button ID="btnExport" Text="Export" runat="server" />
Exporting ASP.Net Table to Excel using jQuery
Inside the jQuery document ready event handler, the Export Button has been assigned a jQuery Click event handler.
When the Export Button is clicked, the jQuery table2excel plugin is applied to the ASP.Net Table and it is converted (exported) to Excel file.
The jQuery table2excel plugin accepts filename parameter which sets the name of the Excel file.
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="Scripts/table2excel.js"></script>
<script type="text/javascript">
    $(function () {
        $("[id*=btnExport]").click(function () {
                filename: "Table.xls"
The ASP.Net Table
Export ASP.Net Table to Excel using jQuery
Excel file being downloaded when Export Button is clicked
Export ASP.Net Table to Excel using jQuery
The generated Excel file
Export ASP.Net Table to Excel using jQuery
Browser Compatibility

The above code has been tested in the following browsers.

Internet Explorer  FireFox  Chrome  Safari  Opera 

* All browser logos displayed above are property of their respective owners.