json2xlsx-export

1.2.2 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i json2xlsx-export

Weekly Downloads

16

Version

1.2.2

License

MIT

Last publish

Collaborators

  • banc