Simple python scripts to convert :
- JSON to Excel ✅
- JSON to CSV ✅
- Multiple CSV to single Excel ✅ 😌
-
Clone the modules and navigate
-
Run
python3 main.py
- select the requied option
- enter the file name as absolute path if it exist on other directories (for windows users) for eg: if the file is loacated at C:\Documents\collection.json And You want the generated output file at C:\Documents\exported\output.xlsx
C:\Users\Mage1k99\json-excel>python3 main.py 1. JSON to Excel 2. JSON to CSV 3. Multiple CSV files to Excel your option (from 1 to 3) : 1 Path of JSON file : C:\Users\Documents\collection.json Sheetname (optional) : mysheet Path of Output Excel :C:\Users\Documents\output.xlsx
(for linux and mac users) eg: if the input file is located at ~/json/inputcollection.json And the output file (xlsx) to be generated at ~/excel/outputexcel.xlsx
mage:~/json-excel$ python3 main.py 1. JSON to Excel 2. JSON to CSV 3. Multiple CSV files to Excel your option (from 1 to 3) : 1 Path of JSON file : ~/json/outputexcel.xlsx Sheetname (optional) : mysheet Path of Output Excel : ~/excel/outputexcel.xlsx
❗ check to be done before conversion ❗
- use python3, (as python2.7 will reach its end of life
- Always add extension to the filepaths while using
- before entering output path make sure that the directory exist!
- Give the correct file and path name
Just use the conversion module in your own projects by importing
screenshot of running main.py with files in absolute path
- pandas
- openpyxl
- setuptools
pip3 install -r requirements.txt
Based on python library pandas
Feel free to
- Fork, modify to add feature and make pull request 👏
- report bugs, request feature through issues 👏