Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 479 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 479 Bytes

node-excel

excel for nodejs

case

import { Excel } from "@dangao/node-excel";

async function test() {
  const excel = new Excel().toXlsx();
  const headers: ExcelRow = [
    {
      value: "head1",
    },
    {
      value: "head2",
    },
  ];
  const cols: ExcelRow[] = [[{ value: "colA1" }, { value: "colB1" }]];
  const sheet = excel.addSheet("sheet1");

  sheet.rows = [headers, ...cols];

  const zipbuffer = excel.getZip();

  return zipbuffer;
}