@json-table/block-to-xlsx
v0.1.0
Published
Library for rendering JSON Table to XLSX
Downloads
153
Readme
@json-table/block-to-xlsx
The exceljs based block to XLSX converter for JSON Table.
Install
npm install @json-table/core @json-table/block-to-xlsx
Usage
import { makeTableInPlaceBaker, makeTableFactory } from "@json-table/core/json-to-table";
import { renderBlockOnWorksheet } from "@json-table/block-to-xlsx";
import { Workbook } from "exceljs";
const cornerCellValue = "№";
const factory = makeTableFactory({ cornerCellValue });
const bake = makeTableInPlaceBaker({ cornerCellValue, head: true, indexes: true });
const wb = new Workbook();
renderBlockOnWorksheet(wb.addWorksheet("Table"), bake(factory(data)));
License
MIT