0.0.1 • Published 1 year ago

aixi_excel v0.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
1 year ago

简介

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");
  });
}
0.0.1

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago