1.0.3 • Published 9 months ago

xlsx-to-json-parser v1.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

xlsx-to-json-parser

Exact Password-Protected Excel (XLS/XLSX) Files to JSON

Installation

npm install xlsx-to-json-parser

Usage

const xlsxToJson = require('xlsx-to-json-parser');

const json = await xlsxToJson({
  path: 'path/to/excel/file.xlsx',
  password: 'SuperSecretPassword',
});

Options

  • path (string, required): Path to the Excel file.
  • password (string, optional): Password to open the Excel file.

Output

The output is a JSON object with the following structure:

{
  "path": "path/to/excel/file.xlsx",
  "sheets": [
    {
      "id": 0,
      "name": "Sheet 1",
      "rows": [
        {
          "id": 1,
          "cells": [
            {
              "id": 2,
              "value": "Name"
            },
            {
              "id": 3,
              "value": "Email Address"
            }
          ]
        },
        {
          "id": 2,
          "cells": [
            {
              "id": 1,
              "value": 1
            },
            {
              "id": 2,
              "value": "Joe Blow"
            },
            {
              "id": 3,
              "value": "joe.blow@nowhere.com"
            }
          ]
        },
      ]
  }
}

Contact Information

If you ever need a hand or have any questions, feel free to reach out.

Fred Lackey
https://fredlackey.com
fred.lackey@gmail.com

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago