[go: up one dir, main page]

Skip to content

masifi/table2excel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

table2excel

Pure javascript html table to Excel exporter

Demo

Exporting HTML table to EXCEL

Installation and Usage

Installation

Load table2excel.min.js in the project header:

<script type="text/javascript" src="table2excel.min.js"></script>

Usage

Create and object obj of Table2Excel(element, options) then call obj.export()

Config

  • element is an element id or class.
  • option is a configuration that includes:
    • exlude rows with a given given class is skiped during the export.
    • filename is a exported file name.

see the below example that exports a <table id="tbl">

let t2e = new Table2Excel('#tbl', {
  exclude: "",
  filename: 'file-name'
});
t2e.export();

Releases

No releases published

Packages