Skip to main content

Extract data from Excel documents.

Project description

exex Build Status Code style: black

Extract data from Excel documents

Features

  • Extract data from Excel (xlsx)
  • Format result as JSON, JSONL, XML

Installation

pip install exex

Usage

Sample Excel file

from exex import extract

ext = extract.Extractor('sample.xlsx')

# Sheets
ext.sheetnames               # (array) sheet names
ext.sheets.active            # (sheet) active sheet
ext.sheets[0]                # (sheet) first sheet
ext.sheets["prices"]         # (sheet) sheet by name

# Cells
sheet["A1"]                  # (value) single cell by name
sheet.cell(row=1, column=1)  # (value) single cell by row/column
sheet["A1":"B2"]             # (array) range of cells

sheet.all()                  # (array) all cells
sheet.cells(["A1", "B2"])    # (array) multiple cells by name

# Rows
sheet[5]                     # (array) single row
sheet[5:10]                  # (array) range of rows

# Columns
sheet["C"]                   # (array) single column
sheet["A:C"]                 # (array) range of columns

Development

Tests (local Python version)

poetry run pytest

Tests (all Python versions defined in tox.ini)

poetry run tox

Code formatting (black)

poetry run black .

Project details


Download files

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

Source Distribution

exex-0.1.4.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

exex-0.1.4-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page