A Python script for converting Excel to Json format, jsonpython
Project path: https://code.csdn.net/langresser/excel2json
A Python script that automatically converts the configuration in Excel to the Json format.
1. This is for Unity, but some modifications can be made to run in any environment.
2. the Excel content must be in the form of a key-value pair. For details, refer to the instructions in the script.
3. The read Code limits the path to read configurations to Resources/config, that is, all configurations must be placed in this directory.
4. install xlrd before running: Execute python.exe setup install in the xlrddirectory.
5. Several key directories are defined at the beginning of the script:
TARGET_PATH: directory for generating json
SOURCE_PATH: Excel directory
STRUCT_TARGET_PATH: generate the c # code directory for reading json
6. excel2json. bat is a command line example.
That is, excel2json. py "excel directory" "generate json directory" generate directory for reading code"