aixi_excel
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

简介

json字符转换为Excel的解决方案

使用方法

import init, { json2excel } from 'aixi_excel';

function download_blob(blob, file_type) {
  const a = document.createElement('a')
  const objectUrl = URL.createObjectURL(blob)
  a.href = objectUrl

  var t = new Date().getTime();

  a.download = t + "." + file_type;
  a.click();
  URL.revokeObjectURL(objectUrl);
}

function aixi_json() {
  console.log("aixi_json");
  init().then(() => {
    var blob = json2excel(JSON.stringify([
      { "Aixi": "aixi" }
    ]));
    download_blob(blob, "xlsx");
  });
}

Readme

Keywords

Package Sidebar

Install

npm i aixi_excel

Weekly Downloads

1

Version

0.0.1

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

4.19 MB

Total Files

6

Last publish

Collaborators

  • aixi