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