1、安装qf-export-excel模块
npm install qf-export-excel
2、引入
import qf from 'qf-export-excel'
3、定义格式
tableList:[
{
title: '姓名', //表头
key: 'name' //对应json键名
},{
title: '年龄',
key: 'age'
},{
title: '出生日期',
birthday: 'birthday'
}
]
4、数据格式
titleData:[{
name:"刘xx",
age:27,
birthday:'1995-1-1'
}]
5、导出
qf(定义格式,数据格式,表名)
这篇博客介绍了如何使用qf-export-excel模块来导出Excel表格,包括安装、导入、定义表格格式、设置数据以及最终的导出步骤。示例中展示了如何定义包含姓名、年龄和出生日期的表格,并提供了相应的数据格式和实际数据,是进行数据导出的一个实用教程。

被折叠的 条评论
为什么被折叠?



