A Python script in Excel converted to JSON format

Source: Internet
Author: User

Project path: Https://code.csdn.net/langresser/excel2json


A python script that automatically transforms the configuration in Excel into JSON format.

1. This is for unity, but a little modification can be run in any environment

2, Excel content requirements for the form of key-value pairs, specifically, you can refer to the instructions in the script.
3, read the code inside limits the path of the read configuration is Resources/config, that is, all the configuration should be placed in this directory
4, before the operation needs to install XLRD: In the xlrd directory execution python.exe setup install
5. At the beginning of the script there are several key directories defined:
Target_path: Generating a JSON directory
directory where source_path:excel
Struct_target_path: Generate a directory that reads the C # code of JSON


6. Excel2json.bat is a command line example
That is, excel2json.py "Excel Catalog" "Generate JSON Directory" "Generate directory to read code"




A Python script in Excel converted to JSON format

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.