1.0.4 • Published 5 years ago

js-xlsx-export v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

js-xlsx-export

一个能导出xlsx的功能

Installation

npm install js-xlsx-export

Notice

使用xlsx插件完成导出功能

Usage

import jsXlsxExport from "js-xlsx-export"

Example

导出
const data = [{name: "1"}];  // sheet1
const fileName = "test"; // 文件名
jsXlsxExport.exportXlsx([data], fileName);

导入,返回的是promise对象
jsXlsxExport.getJsonData(file) // file对象
    .then(data => {
        console.log(data); // {sheet1:[xxx], sheet2:[]}
    })
    .catch(e => {
        console.log("error", e);
    });
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago