p-export-excel

1.0.0 • Public • Published

p-export-excel 官方文档

安装引入

npm安装

npm i p-export-excel

import pExportExcel from "p-export-excel";

cdn引入

<script src="https://unpkg.com/p-export-excel@1.0.0/lib/p-export-excel.js"></script>

使用示例

let ShowLabel = [[{ text: '学员姓名' }, { text: '手机号' }]];
let list = []
for (let i = 0; i < 5; i++) {
  list.push([{
    text: "学员" + i
  }, {
    text: 18800000000 + i,
    style: "color:red"
  }])
}
list.push([{
  text: "注:此数据为p-export-excel测试数据!",
  colspan: "2",
  align: "left"
}])
pExportExcel({
  fileName: "学员统计表",
  theadList: ShowLabel,
  tbodyList: list
})

配置项

excel配置项

fileName--文件名 footName--表名 theadList--表头信息 tbodyList--内容数据信息

单元格配置项

text--内容 colspan--水平合并单元格 rowspan--垂直合并单元格 style--样式 align--对齐方式

Package Sidebar

Install

npm i p-export-excel

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

8.1 kB

Total Files

6

Last publish

Collaborators

  • pbstar