How to export an HTML table as a .xlsx file
A great client-side tool for exporting html
tables to xlsx
, xls
, csv
, or txt
is TableExport by clarketm (me). It is a simple, easy-to-implement, full-featured library with a bunch of configurable properties and methods.
Install
$ npm install tableexport
Usage
TableExport(document.getElementsByTagName("table"));
// OR using jQuery
$("table").tableExport();
Documentation
Sample apps to get you started
- TableExport + RequireJS
- TableExport + Flask
- TableExport + Webpack 1
- TableExport + Angular 4 + Webpack 2
Check out the compendious docs or just head over to
TableExport
on Github for a full list of features.
You can use this plug-in for exporting table to .xlsx
http://sheetjs.com/demos/table.html