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
Built Distribution
File details
Details for the file excel2json-3-0.1.6.tar.gz
.
File metadata
- Download URL: excel2json-3-0.1.6.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
20c2ecd6db32a06455b036465e508c7d5e6cd3211aa3fb884ad5ecdd5e6d04b3
|
|
MD5 |
a320b202987edbf5b0d6976f5a396987
|
|
BLAKE2b-256 |
987d557db0654be5a6db7964de98ceaef8856002ab6961707a916b92f2ace55c
|
File details
Details for the file excel2json_3-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: excel2json_3-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a564dd4f89abc5dc8be1cde33e4ceaa16babf8fb1733613f5fb67bf9bc8a8f09
|
|
MD5 |
f8326ec98c0781c82680c5731c991dd0
|
|
BLAKE2b-256 |
19273edae2a6cf0d7f1efed5f9913b7c6eca86600238632289b05773f638621c
|