Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Convert Excel Sheet into JSON file.

Project description

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

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

  1. Python 3

Create Virtual Enviroment

Using pipenv (Recommended)

  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
``` 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
excel2json_3-0.1.6-py3-none-any.whl (7.0 kB) Copy SHA256 hash SHA256 Wheel py3 Aug 9, 2018
excel2json-3-0.1.6.tar.gz (5.7 kB) Copy SHA256 hash SHA256 Source None Aug 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page