1.0.0 • Published 1 year ago

delaynomore-excel-exports v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Excel 导出

下载

    npm i delaynomore-excel-exports -S

使用

    const exl = require('delaynomore-excel-exports')

    exl.download(file,title,data)  
    // 触发download函数,下载exl表格   
    // 三个参数(文件名,EXL标题数组类型,EXL数据)

    exl.stringify(title,data)
    // 将数据转换成 能让download方法识别的样式
    // 两个参数 title---表格名数组类型   
    //          data----表格数据

    // 表格数据一般为以下样式
    data = [
        { id : 1, title : 'a' },
        { id : 2, title : 'b' },
    ]
    
    // 注意:title数组中的元素 写几列就要跟data中的列数对应
1.0.0

1 year ago