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

Check out the compendious docs or just head over to TableExport on Github for a full list of features.

Leave a Comment