Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Aaronlamz/excel-to-json
⚒️ Convert Excel to JSON for i18n
https://github.com/Aaronlamz/excel-to-json
cli excel excel-to-json i18n i18n-messages json nodejs
Last synced: 26 days ago
JSON representation
⚒️ Convert Excel to JSON for i18n
- Host: GitHub
- URL: https://github.com/Aaronlamz/excel-to-json
- Owner: aaronlamz
- Created: 2020-03-14T09:45:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T23:53:14.000Z (8 months ago)
- Last Synced: 2024-01-08T08:50:18.811Z (5 months ago)
- Topics: cli, excel, excel-to-json, i18n, i18n-messages, json, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/excel-to-json-parser
- Size: 1.09 MB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-vue - excel-to-json - A easy tool is created to convert Excel to JSON for i18n. (Components & Libraries / Utilities)
README
[![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 --sourceFileOptions:
-V, --version output the version number
-s, --sourceFile 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)