json2xlsx-export

JSON Transformer to create .xlsx files

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
json2xlsx-export
031.2.26 years ago6 years agoMinified + gzip package size for json2xlsx-export in KB

Readme

json2xlsx-export
Lightweight in browser .xlsx exporter.

How it use since v1.2.0

import json2xlsx from 'json2xlsx-export';

const config = {
  filename: 'AwesomeFile',
  sheets: [
    {
      name: 'Sheet1',
      data: [
        [{
          value: 'Text1',
          type: 'string'
        },{
          value: 'Text2',
          type: 'string'
        }, {
          value: 1000,
          type: 'number'
        }]
      ]
    },
    {
      name: 'Sheet2',
      data: [
        [{
          value: 'New text1',
          type: 'string'
        },{
          value: 'New text2',
          type: 'string'
        }, {
          value: 2000,
          type: 'number'
        }]
      ]
    }
  ]
};

json2xlsx(config);

How it use in earlier versions

import json2xlsx from 'json2xlsx-export';

const config = {
  filename: 'AwesomeFile',
  sheet: {
    data: [
      [{
        value: 'Text',
        type: 'string'
      },{
        value: 'Another text',
        type: 'string'
      }, {
        value: 1000,
        type: 'number'
      }]
    ]
  }
};

json2xlsx(config);