Extract data from Excel documents.
Project description
exex
Extract data from Excel documents
Features
- Extract data from Excel (xlsx)
- Format result as JSON, JSONL, XML
Installation
pip install exex
Usage
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
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
exex-0.1.4.tar.gz
(3.2 kB
view hashes)
Built Distribution
exex-0.1.4-py3-none-any.whl
(3.1 kB
view hashes)