Coder Social home page Coder Social logo

excel2json's Introduction

excel2json

excel to json,将excel文件转换为json数组形式

依赖

openpyxl

pip3 install openpyxl

配置

需要先配置config.py文件,确定输入输出文件名,以及sheet和header line config.py

"input_file_path"       输入路径  
"output_file_path"      输出路径  
"sheet"                 要转换excel中的哪个sheet  
"header_line"           header在哪一行,会从header行开始解析,跳过header之前的行  

command:

python3 excel2json.py

example input excel: 123.xlsx

id 颜色 大小 性别
1
2
3

example output json: out.json

[
  {
    "id":1,
    "颜色":"",
    "大小":"",
    "性别":"",
  },
  {
    "id":2,
    "颜色":"",
    "大小":null,
    "性别":"",
  },
  {
    "id":3,
    "颜色":null,
    "大小":"",
    "性别":"",
  },
]

excel2json's People

Contributors

secake avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

15810644043

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.