Excel文档转 JSON 格式工具

logo

build

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.

Key zh_CN zh_HK en and more languages...
hello 你好 你好 hello ...
world 世界 世界 world! ...

output JSON:

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

Installation

Using npm:

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

Using yarn:

$ yarn global add excel-to-json-parser

Usage

etj --sourceFile /yourdir/example.xlsx
// or
etj -s /yourDir/example.xlsx

Examples

yarn example

TODO

  • Add UI for configuring the output file options

License

MIT

excel-to-json repo

posted @ 2022-05-25 00:00  Aarongo  阅读(242)  评论(0编辑  收藏  举报