npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

excel-json-cli1

v2.2.3

Published

用于把表格数据导成json数据,可支持json、ts和js,或者,用于把json数据导成表格数据,可支持json、ts和js。

Downloads

90

Readme

命令导出数据

用于把表格数据导成json数据,可支持json、ts和js,或者,用于把json数据导成表格数据,可支持json、ts和js。

1、excel2json 命令

用于把表格数据导成json数据,可支持json、ts和js。

选项说明

| 选项 | 说明 | | ------------------------------------------- | ------------------------------------------------------------ | | -v, --version | 查看工具版本 | | -i, --input <file> | 必填,输入要导成json的xls、xlsx文件,可带路径 | | -r, --rule <key-col-num:key-col-interval> | 选填,解析表格规制,key-col-num为数据key列索引,key-col-interval为数据范围 (如:0:[4,15]表示第一列为key,第五列到第十九列为数据),默认为0:[1] | | -a, --add | 选填,增量导出数据,先获取原有数据 | | -nmf, --not-match-filename | 选填,不检验文件或文件夹名称为小写字母-大写字母 | | -k, --key | 选填,已key为主体导出数据,没值时为空字符串 | | -mod, --multilevel-object-deconstruct | 选填,将key以“.”分隔的数据转成多层对象 | | -o, --output <path> | 选填,选填,输出文件路径及后缀配置(ts/js/json),文件名或文件夹以**代替,文件存储路径不存在则自动创建,默认为./**.ts | | -h, --help | 查看命令帮助文档 |

命令说明

| 命令 | 说明 | | ---- | ---------------- | | help | 查看命令帮助文档 |

示例

文档

| key | zh-CN | ar-AR | de-DE | en-US | es-ES | fr-FR | id-ID | ms-MS | pt-PT | ru-RU | th-TH | tr-TR | vi-VI | zh-HK | zh-TW | | -------- | ----- | ------- | ---------- | -------- | --------- | --------- | -------- | -------- | --------- | ------- | ------ | ------- | -------- | ----- | ----- | | France | 法国 | فرنسا | Frankreich | France | Francia | France | Prancis | Perancis | França | Франция | ฝรั่งเศส | Fransa | Pháp | 法國 | 法國 | | Thailand | 泰国 | تايلاند | Thailand | Thailand | Tailandia | Thaïlande | Thailand | Thailand | Tailândia | Таиланд | ไทย | Tayland | Thái Lan | 泰國 | 泰國 |

命令

excel2json -i ./local.xlsx -o ./**.ts -r 0:[1,15] -a

excel2json -i ./local.xlsx -o ./**/file.json -r 0:[3,15] -a -k -nmf

2、json2excel 命令

用于把表格数据导成json数据,可支持json、ts和js。

选项说明

| 选项 | 说明 | | ------------------------------------- | ------------------------------------------------------------ | | -v, --version | 查看工具版本 | | -i, --input <path> | 必填,输入文件路径及后缀配置,文件名或文件夹以**代替,文件支持ts、js和json文件,如:./**.ts、./**/file.json | | -mod, --multilevel-object-deconstruct | 选填,将对象转成单层对象数据,key以“.”分隔 | | -o, --output <file> | 选填,输出要导成的xls、xlsx文件,可带路径,默认为local.xls (default: "local.xls") | | -h, --help | 查看命令帮助文档 |

命令说明

| 命令 | 说明 | | ---- | ---------------- | | help | 查看命令帮助文档 |

示例

ts文件示例

export default {

"France": "法国",

"Thailand": "泰国"

}

命令

json2excel -i ./**.ts -o local.xlsx

json2excel -i ./**/file.json -o local-cs.xlsx