Excel to JSON Converter

A minimal API that converts MS Excel (.xls & .xlsx) files, or from a given URL into JSON files.
Features
-
Download as package using pip
and use in your code.
-
Supports both type of MS Excel file formats
- MS Excel 2003 (.xls)
- MS Excel 2007 (.xlsx)
-
It also comes with command line interface (CLI) which facilitates the conversion from URL or local MS Excel file to JSON files.
Example:
- GET file from URL & convert to JSON.
excel2json-3 --urls https://example.com/example.xls
- GET file from disk & convert to JSON.
excel2json-3 --file /home/ubuntu/Documents/example.xlsx
Contribution
You can contribute in following ways:
- Report bugs
- Add more "APIs"
- Give suggestions to make it better
- Fix issues & submit a pull request
Installation
Using pipenv
(Recommended)
pipenv install excel2json-3
pip install excel2json-3
Uses
Convert MS Excel File to JSON file
from excel2json import convert_from_file
EXCEL_FILE = '../example.xls'
convert(EXCEL_FILE)
Convert to JSON file directly from URL
from excel2json import convert_from_url
EXCEL_FILE_URL = 'https://www.example.com/example.xlsx'
convert(EXCEL_FILE_URL)
DEVELOPEMENT
Pre-requisites
Create Virtual Enviroment
Using pipenv
(Recommended)
-
Install virtualenv
pip install virtualenv
-
Create virtualenv
mkdir myvenv
cd myvenv
virtualenv myvenv
-
Activate myvenv
venv
source myvenv/bin/activate
or
. myvenv/bin/activate
-
Install from requirements.txt
pip install -r requirements.txt
Testing
```
pytest tests/test.py
```