Giter VIP home page Giter VIP logo

excel2pb's Introduction

excel2pb

一个简单高效的excel导表工具,xlsx => Google.Protobuf

特性

  • 支持解析.xlsx格式文件,导出对应的 proto、bytes、cs、json 数据
  • 支持差异化导出,每次仅导出变动过的数据,提高效率
  • 支持行注释、列注释

格式约定

表格前5行,分别为 字段作用域、字段规则、字段类型、字段名称、固定备注

  • 字段作用域:指定作用域,导出时配合 --column-exclude 使用
  • 字段规则:optional repeated
  • 字段类型:double、float、int32、int64、uint32、uint64、sint32、sint64、fixed32、fixed64、sfixed32、sfixed64、bool、string
  • 字段名称:小驼峰式命名
  • 固定备注:备注行

基础用法

excel2pb.exe --input-dir ./xlsx

命令行参数

  • [Required] --input-dir DIR 指定Excel文件目录,目录下所有的 .xlsx 文件都将被解析

  • [Optional] --output-dir DIR 指定导出数据目录,默认值等同于 --input-dir

  • [Optional] --force-rebuild 是否重新导出数据,默认值为空 ,仅导出变动过的文件

  • [Optional] --proto-merge MERGED_NAME 是否合并协议文件,默认不合并

  • [Optional] --package-name PACKAGE_NAME 指定消息包名,默认值 XlsxProtos

  • [Optional] --column-exclude COLUMNS 指定忽略的列,默认为空,如需忽略多个列则用 | 进行分割

  • [Optional] --table-prefix PREFIX 导出的表前缀,默认值 st_ (StaticTable)

  • [Optional] --descriptor_set_out 是否导出proto文件描述集,默认不导出

excel2pb's People

Contributors

chinacjxs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mengtest

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.