UNPKG

data-to-export

Version:

base64数据导出,支持txt、doc、xls

15 lines (13 loc) 378 B
### 使用步骤 ``` import { tableToExcel } from "table-to-excel" <table id="tableId"> <thead> <tr><th>表头1</th><th>表头2</th><th>表头3</th></tr> </thead> <tbody> <tr><td>数据1</td><td>数据2</td><td>数据3</td></tr> </tbody> </table> tableToExcel(document.getElementById("tableId"), "导出的表格名称"); ```