Skip to main content

A excel convert package

Project description

excel2x

转换 Config 配置工具 excel2x

Python3excel2x。只需要用工具生成自己项目的配置文件,就可以按照配置文件导Excel表了。现在支持 luajson 格式,后面后继续扩展 csvxml 等格式。

支持生成数据格式 Schema,现在支持 Lua SchemaJSON Schema, 后面会支持 TypeScript interfaceJava ClassC# Class


安装

pip install excel2x

使用方式

查看帮助

python3 -m excel2x -h
# or
excel2x-cli -h

创建项目配置

python3 -m excel2x --config project_path/config.json --name project_name --create
# or
excel2x-cli --config project_path/config.json --name project_name --create

命令行转换 Excel

按 config.json 配置转换

python3 -m excel2x --config project_path/config.json
# or
excel2x-cli --config project_path/config.json

转换单个文件

excel2x-cli -i xxx/xxx.xlsx -o project_path/xxx.json -f json

Python 脚本中使用

#!/usr/bin/env python3
# -*- coding: utf-8 -*

from excel2x import convert_config
from excel2x import convert_one

if __name__ == "__main__":
    # 项目配置路径
    proj_config_path = "project_path/config.json"
    convert_config(proj_config_path)

    # 单个文件转换
    convert_one("xxx/xxx.xlsx", "project_path/xxx.json", "json")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

excel2x-0.0.6.tar.gz (98.9 kB view details)

Uploaded Source

Built Distribution

excel2x-0.0.6-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file excel2x-0.0.6.tar.gz.

File metadata

  • Download URL: excel2x-0.0.6.tar.gz
  • Upload date:
  • Size: 98.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for excel2x-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a8d89884751b5b19c55e4934b24657a103fb700872771c07d6526d96d49b702b
MD5 7805ff21bf31eb7c8762c2edb224d778
BLAKE2b-256 603cd870c82d88892e4738772cb7c2312d62b27a2176236dae43c32c5653c3d9

See more details on using hashes here.

File details

Details for the file excel2x-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: excel2x-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for excel2x-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 82e5349c6b3056fcf9840c379142adaaaedd9188f70ab7d0de3f2174030633cb
MD5 ed4c2a7429b6a8e2fc9c47044b7fd0d3
BLAKE2b-256 7b0414fedf929fca4b6a167610c294311c47879ad0f5c78abf315e62397de385

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page