1.0.5 • Published 5 years ago

exceltodict v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

一个处理excel字典数据的命令行工具;

用法:

安装

$ npm -i exceltodict -g; //全局安装插件


执行命令

####示例1:批量处理指定目录下的.xlsx文件;

$ exd ./excels ./out

./excels文件夹存放待处理的.xlsx文件(支持子目录检索)

./out文件夹为输出目录(不存在时会自动创建,输出文件保留源数据目录结构)

####示例2: 处理指定.xlsx文件 $ exd ./excels/data.xlsx ./out

./excels/data.xlsx为待处理数据文件

./out文件夹为输出目录

####注意:

缺省参数会默认为 './' './out'

字典表说明:

  1. excel字典表第1行为字段名,不可使用非真字符串
  2. excel字典表第2行为数据类型,目前两种str (字符串类型:导出时会添加"") other (其他数据类型:导出不加引号)
  3. str类型字典数据漏填时会默认导出"";其他类型漏填时导出0;
  4. excel字典表第2行数据类型漏填时默认为other;

源数据表示例:

idnameagedesc
otherstrotherstr
1小红13学习委员
2小明12班长
3小李15劳动委员

##导出数据示例:

var dict_users=[
  {
    id:1,
    name:"小红",
    age:13,
    desc:"学习委员"
  },
  {
    id:2,
    name:"小明",
    age:12,
    desc:"班长"
  },
  {
    id:3,
    name:"小李",
    age:15,
    desc:"劳动委员"
  },
];
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago