Code Monkey home page Code Monkey logo

excel2json's Introduction

excel2json

原帮助文档请见:https://neil3d.github.io/coding/excel2json.html

命令行参数

  • -e, –-excel Required. 输入的Excel文件路径.
  • -o, –-json 指定输出的json文件路径.
  • -h, –-header Required. 表格中有几行是表头.
  • -c, –-encoding (Default: utf8-nobom) 指定编码的名称.
  • -l, –-lowcase (Default: false) 自动把字段名称转换成小写格式.
  • -a 序列化成数组
  • -d, --date:指定日期格式化字符串,例如:dd / MM / yyy hh: mm:ss
  • -t 序列化时强制带上sheet name,即使只有一个sheet
  • -x, --exclude_prefix: 导出时,排除掉包含指定前缀的表单和列,例如:-exclude_prefix #
  • -j, --cell_json:自动识别单元格中的Json对象和Json数组,Default:false
  • -s, --sever_data: 通过header中是否有server或者client 判断 是否导出server数据,还是 client数据

示例: mono ./excel2json.exe -e ./ExampleData.xlsx -o ./ExampleData.json -a -h4 -x# -j -s 注释:

  • 在mac 环境中 使用mono 运行exe文件执行excel2json 命令
  • -e 转化ExapmleData.xlsx 文件
  • -o 生成目标为ExampleData.json的文件
  • -a 把table生成arrary的形式,如果需要也可以生成字典的形式,方便调用
  • -h4 表头有4行,第五行才开始读取数据
  • -x# sheet名字前面如果有# 还是表头的第一个有# 那么都忽略导出
  • -j 把如果可以生成json的列都生成json格式,方便支持多种数据格式
  • -s 只导出服务端数据,忽略行中有client字段的内容

excel2json's People

Contributors

dantezhu avatar dyc92 avatar neil3d avatar pashcovich avatar thomaszj avatar winhoof avatar wuxian avatar zengrd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.