xlsxfromjson

1.0.1 • Public • Published

xlsxfromjson

Lightweight JSON to xlsx creation in browser. Fork of zipcelx. This version supports adding multiple sheets.

Example Use

import xlsxfromjson from 'xlsxfromjson';


function createExcelFile() {
  const config = {
    filename: 'Test',
    sheets: {
      sheet1: {
        data: [
          [{
            value: 'Income - Webshop',
            type: 'string'
          }, {
            value: 1000,
            type: 'number'
          }]
        ],
        sheetName: 'Test Sheet'
      },
      sheet2: {
        data: [
          [{
            value: 'Income - Webshop2',
            type: 'string'
          }, {
            value: 2000,
            type: 'number'
          }]
        ],
        sheetName: 'Test Sheet2'
      }
      
    }
  };
  xlsxfromjson(config);
}

export default createExcelFile;

Readme

Keywords

Package Sidebar

Install

npm i xlsxfromjson

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

417 kB

Total Files

35

Last publish

Collaborators

  • davidryansoftware