① , 支持字段类型( int / float / string / bool / int[] / float[] / string[] / bool[] )
② , 支持前端/后端差别配置
③ , 支持说明书sheet
④ , 支持更改编码方式
⑤ , 支持展开/收缩属性结构
⑥ , 支持Array模式
⑦ , 支持多sheet配置方式
⑧ , 其余基础的功能前端
① , 此工具是使用DOS命令的方式来运行的 , 帮助以下图:
现对各个命令作解释:
1` -e 或者 --excel (如下只写短命令) : excel的相对位置git
2` -j : 导出的json的名称 3` -h : sheet的头的行数(我建议用5个) 4` -c : 编码方式 5` -l : 字段名称是否转为小写 6` -a : 是否使用Array模式 7` -q : 是否为前端配置 8` -i : 最后一个sheet是否为说明书(若是是则不导出config) 9` -o : 导出的json是不是树形结构展开
② , 关于资源的位置
若是相对于AonauflyConfig.exe同级目录的话 , 直接使用 --excel xxx.xlsx 和 --json xxx.json;
若是不是 , 这样相对应地使用../等 , 获取相对目录
③ , 给出几个命令(须要在AonauflyConfig.exe同级目录打开cmd窗口)
1 : AonauflyConfig --excel test.xlsx --json test.json --header 5 --qianduan true --instruction true --open true
意思 : 将test.xlsx 导到 同级目录 test.json ; sheet的标题行数为5 ; 前端配置 ; 树形结构展开github
2 : AonauflyConfig --excel test.xlsx --json test.json --header 5 --array false --qianduan true --instruction true
意思:将test.xlsx 到到 同级目录 test.json ; sheet的标题行数为5 ; Array模式;前端配置 ; 最后的sheet为说明表(不打印)json
1` 第一行(固定) : 字段名称后端
2` 第二行(固定) : 字段类型ide
3` 第三行(固定) : 后端 (Y : 打印 / N : 不打印)工具
4` 第四行(固定) : 前端( Y : 打印 / N : 不打印 )编码
5` ~ n 随意填写3d
{"Model":{ "1": { "id": 1, "description": "力量型", "agility": 10, "brains": 10, "initHp": 200, "initMagic": 100, "powerIncrease": 5.0, "agilityIncrease": 2.5, "brainsIncrease": 2.5, "speed": 300, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] }, "2": { "id": 2, "description": "敏捷型", "agility": 25, "brains": 10, "initHp": 125, "initMagic": 175, "powerIncrease": 2.5, "agilityIncrease": 5.0, "brainsIncrease": 2.5, "speed": 400, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 10 ] }, "3": { "id": 3, "description": "智力型", "agility": 10, "brains": 25, "initHp": 100, "initMagic": 200, "powerIncrease": 2.5, "agilityIncrease": 2.5, "brainsIncrease": 5.0, "speed": 300, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 11 ] }, "4": { "id": 4, "description": "力敏型", "agility": 18, "brains": 9, "initHp": 175, "initMagic": 125, "powerIncrease": 4.0, "agilityIncrease": 4.0, "brainsIncrease": 2.0, "speed": 350, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 12 ] }, "5": { "id": 5, "description": "敏智型", "agility": 18, "brains": 18, "initHp": 125, "initMagic": 175, "powerIncrease": 2.0, "agilityIncrease": 4.0, "brainsIncrease": 4.0, "speed": 350, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 13 ] }, "6": { "id": 6, "description": "力智型", "agility": 9, "brains": 18, "initHp": 175, "initMagic": 125, "powerIncrease": 4.0, "agilityIncrease": 2.0, "brainsIncrease": 4.0, "speed": 300, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 14 ] }, "7": { "id": 7, "description": "综合型", "agility": 15, "brains": 15, "initHp": 150, "initMagic": 150, "powerIncrease": 3.33, "agilityIncrease": 3.33, "brainsIncrease": 3.33, "speed": 325, "skillIdList": [ 1, 2, 3, 4, 5, 6, 7, 8, 15 ] } }}
能够看出sheet名称做为了config每一个表的title. 而且power字段和xxx字段是没有的..excel
https://github.com/neil3d/excel2json本人在此代码上进行了扩展及修改 ... 感谢万能的互联网.