Skip to main content

Excel to JSON Converter

Build Status PyPI version Python Version Issues Forks Stars License Say Thanks

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

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

  1. Python 3

Create Virtual Enviroment

  1. Install pipenv

    pip install pipenv
    
  2. Create env

    cd excel2json-3  # cd <repo_dir>
    pipenv --three install
    
  3. Activate env

    pipenv shell
    
  4. Install requirements from Pipefile

    pipenv sync
    

Using virtualenv

  1. Install virtualenv

    pip install virtualenv
    
  2. Create virtualenv

    mkdir myvenv
    cd myvenv
    virtualenv myvenv
    
  3. Activate myvenv venv

    source myvenv/bin/activate
    
    or 
    
    . myvenv/bin/activate
    
  4. Install from requirements.txt

    pip install -r requirements.txt
    

Testing

```
pytest tests/test.py
``` 

Metadata

Release files for excel2json-3 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for excel2json-3 0.1.6
File Size Uploaded
excel2json-3-0.1.6.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for excel2json-3 0.1.6
File Interpreter ABI Platform
excel2json_3-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / excel2json-3-0.1.6.tar.gz

Download URL excel2json-3-0.1.6.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
20c2ecd6db32a06455b036465e508c7d5e6cd3211aa3fb884ad5ecdd5e6d04b3
BLAKE2b-256 checksum
How to use checksums
987d557db0654be5a6db7964de98ceaef8856002ab6961707a916b92f2ace55c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / excel2json_3-0.1.6-py3-none-any.whl

Download URL excel2json_3-0.1.6-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a564dd4f89abc5dc8be1cde33e4ceaa16babf8fb1733613f5fb67bf9bc8a8f09
BLAKE2b-256 checksum
How to use checksums
19273edae2a6cf0d7f1efed5f9913b7c6eca86600238632289b05773f638621c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page