Export Html Table To Excel Spreadsheet jQuery Plugin – table2excel

Table
File Size: 1.94 KB
Views Total: 2060 views
Last Update:December 05, 2022
Publish Date: February 01, 2014
Official Website: Go to website
License: MIT
Plugin Author:
Demo    Download

A Free jQuery Plugin with table2excel is Export Html Table To Excel Spreadsheet jQuery Plugin. This plugin is simple to useful jQuery plugin which allows for exporting Html table data to an Excel file sheet.

Alternative plugins:

How to use:

Include jQuery library after the jQuery table2excel plugin in the Html web page.

<script src="jquery/1.11.1/jquery.min.js"></script>
<script src="src/jquery.table2excel.js"></script>

Create an ‘Export’ button to export table data to an Excel file manually.

<button>Export</button>

Call the Function of plugin on the table and pass the following options.

$("button").click(function(){
  $("#table2excel").table2excel({
    // exclude CSS class
    exclude: ".noExl",
    name: "Worksheet Name",
    filename: "SomeFile", //do not include extension
    fileext: ".xls" // file extension
  }); 
});

Add the CSS class ‘noExl’ to any tr tags to ignore the specified table data while exporting.

<tr class="noExl">
  <th>#</th>
  <th>Column heading</th>
  <th>Column heading</th>
  <th>Column heading</th>
</tr>

Add the background and font colors. Default: false.

$("#table2excel").table2excel({
  exclude: ".noExl",
  name: "Worksheet Name",
  filename: "SomeFile",
  fileext: ".xls",
  preserveColors: true
}); 

Done

Thanks for make jQuery plugin is developed by For more Helpfull for users, please check the demo page or visit the official website.
List Of Version :
  • 1.1.2
  • 1.1.1
  • 1.1.0

guri singh

My name is Guri. I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

Related jQuery Plugins

You Might Also Like