Skip to main content

Extract data from Excel documents.

Project description

exex test codecov Code style: black

Extract data from Excel documents


pip install exex


Sample Excel file

Load Excel file

from openpyxl import load_workbook
from exex import parse

book = load_workbook("sample.xlsx") # load excel file
sheet = # get active sheet

Single cell by name


Single cell by row/column number

parse.values(sheet.cell(row=1, column=1)) 

Range of cells

  ["name", "abbreviation"],
  ["alpha", "a"],

All cells

  ["name", "abbreviation", "age"],
  ["alpha", "a", 1],
  ["beta", "b", 2],
  ["gamma", "g", 3],

Row by number

["alpha", "a", 1]

Range of rows

  ["name", "abbreviation", "age"],
  ["alpha", "a", 1],

Column by name

["name", "alpha", "beta", "gamma"]

Rangge of columns

  ["name", "alpha", "beta", "gamma"],
  ["abbreviation", "a", "b", "g"],

Ways to access sheets

# Sheets
book.sheets[0]                # (sheet) sheet by index
book.sheets["prices"]         # (sheet) sheet by name                   # (sheet) active sheet

book.sheetnames               # (array) sheet names



poetry install

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-1.0.0.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

exex-1.0.0-py3-none-any.whl (3.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page