# excel-to-json-parser

> Convert Excel to JSON

Latest version **1.0.11** (published 2022-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install excel-to-json-parser
pnpm add excel-to-json-parser
yarn add excel-to-json-parser
bun add excel-to-json-parser
```

Provides the command `etj`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2022-10-10 |
| First published | 2022-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aaron Lam |
| Maintainers | linjiajun |
| Keywords | excel, json, excel-to-json |

## Links

- npm: https://www.npmjs.com/package/excel-to-json-parser
- Homepage: https://github.com/Aaronlamz/excel-to-json#readme
- Issues: https://github.com/Aaronlamz/excel-to-json/issues
- npm.io page: https://npm.io/package/excel-to-json-parser

## Dependencies (5)

- [open](https://npm.io/package/open.md) ^7.0.3
- [chalk](https://npm.io/package/chalk.md) ^5.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.4
- [commander](https://npm.io/package/commander.md) ^9.2.0
- [node-xlsx](https://npm.io/package/node-xlsx.md) ^0.21.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.11 (latest) — 2022-10-10
- 1.0.10 — 2022-09-06
- 1.0.9 — 2022-07-28
- 1.0.8 — 2022-06-10
- 1.0.7 — 2022-05-26
- 1.0.6 — 2022-05-26
- 1.0.5 — 2022-05-26
- 1.0.4 — 2022-05-25
- 1.0.3 — 2022-05-24
- 1.0.2 — 2022-05-23

## README

<p align="center">
    <img src="https://github.com/Aaronlamz/excel-to-json/blob/dev/logo.png" alt="logo" width="200"  />
</p>

[![build](https://github.com/Aaronlamz/excel-to-json/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/Aaronlamz/excel-to-json/actions/workflows/npm-publish.yml)

## ⚡ Why need this?
i18n messages is stored in Excel file, but it is not easy to edit in your code. So, this tool is created to convert Excel to JSON. 

## 📜 Features
Excel data structure is converted to JSON.
The key of the first column of the first row is required.

| key | zh_CN | zh_HK | en | and more languages...
|:---|:---|:---|:---|:---|
| hello | 你好 | 你好 | hello | ... |
| world | 世界 | 世界 | world! | ... |

output JSON:

```json
{
   "zh_CN": {
        "hello": "你好",
        "world": "世界",
    },
    "zh_HK": {
        "hello": "你好",
         "world": "世界",
    },
    "en": {
        "hello": "hello",
         "world": "world!",
    }
}
```

## 🌈 Installation

Using npm:

```sh
$ npm install -g excel-to-json-parser
```

Using yarn:

```sh
$ yarn global add excel-to-json-parser
```

## 🔥 Usage
run etj --help without arguments to see list of options:
```sh
Usage: etj --sourceFile <dir>

Options:
  -V, --version           output the version number
  -s, --sourceFile <dir>  source file path need to be converted
  -h, --help              display help for command
```

use CLI
```sh
etj --sourceFile /yourdir/example.xlsx
// or
etj -s /yourDir/example.xlsx
```

## 🔧 Examples
run example
```sh
yarn example
```

## ©️ License

[MIT](https://en.wikipedia.org/wiki/MIT_License)

---
_Source: https://npm.io/package/excel-to-json-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
