1.0.0 • Published 6 months ago

p-export-excel v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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--对齐方式

1.0.0

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago