Light weight jQuery plugin for export table to excel file
Website and demo here:
http://tanvirpro.com/all_project/jQueryTableToExcel
-
Download the last release manually
Include jQuery and the plugin.
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script src="js/
jquery.tableToExcel.js"></script>
Create Excel file form HTML table
Add plugin any table with CSS selector
Company
Contact
Country
Alfreds Futterkiste
Maria Anders
Germany
Centro comercial Moctezuma
Francisco Chang
Mexico
Ernst Handel
Roland Mendel
Austria
Island Trading
Helen Bennett
UK
Laughing Bacchus Winecellars
Yoshi Tannamuri
Canada
Magazzini Alimentari Riuniti
Giovanni Rovelli
Italy
Apply the plugin to HTML table element on your HTML page and get excel file as like the table.
<script> $(selector).
tblToExcel(); //... or $('button').click(function () { $('table').tblToExcel(); }); </script>
Download xlx file
-
complete — Callback function trigged after the detection is completed
complete: function () { // ... }