knd-html-table-to-xlsx
v1.0.4
Published
Generates a .xlsx file from a html table element.
Downloads
5
Maintainers
Readme
knd-html-table-to-xlsx
knd-html-table-to-xlsx is a .xlsx generator from html table elements
Installation
npm i knd-html-table-to-xlsx
Usage
Client side:
//to get a string of table element
const htmlTable = document.getElementsByTagName('table')[0].outerHTML
//after this, send this array of strings to the server side to call the generateSheet function
Server side:
const {generateSheet} = require('knd-html-table-to-xlsx')
//generate the .xlsx file and print the absolute path where the file was created
const app = async (tables) => {
console.log(await generateSheet(tables));
}