Convert Excel Sheet into JSON file.
Project description
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
Using pip
pip install excel2json-3
Uses
Convert MS Excel File to JSON file
from excel2json import convert_from_file
EXCEL_FILE = '../example.xls' # or '../example.xlsx'
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
- Python 3
Create Virtual Enviroment
Using pipenv
(Recommended)
-
Install pipenv
pip install pipenv
-
Create env
cd excel2json-3 # cd <repo_dir> pipenv --three install
-
Activate env
pipenv shell
-
Install requirements from Pipefile
pipenv sync
Using virtualenv
-
Install virtualenv
pip install virtualenv
-
Create virtualenv
mkdir myvenv cd myvenv virtualenv myvenv
-
Activate
myvenv
venvsource myvenv/bin/activate or . myvenv/bin/activate
-
Install from requirements.txt
pip install -r requirements.txt
Testing
```
pytest tests/test.py
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
excel2json-3-0.1.5.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for excel2json_3-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 722fdbe7c820b21be508a2a26f58026fb555c1569e9703f1126414f7ddbc4a20 |
|
MD5 | 2f66cfc0ee63dc310bf3901bf209a637 |
|
BLAKE2b-256 | 561ab90b2a07c3e271256d6cf78e6203a1d0c857714f8016a7880eef68cc312e |