浏览器端文件导出,支持 json、csv、txt、xml、word、excel、image、pdf

2,747 阅读1分钟
原文链接: github.com

tableExport.js

table导出文件,支持导出jsontxtcsvxmldocxslimagepdf

usage

// dom id, filename, type: json, txt, csv, xml, doc, xsl, image, pdf
tableExport('table1', 'test', 'image');

build

git clone git@github.com:huanz/tableExport.git
cd tableExport
npm i

// 开发
npm run dev

// 构建个人版本
MODULES='doc xls image' npm run build