Skip to main content

excelreader (Python)

Read XLSX, XLSB, XLS and CSV through ExcelReader's NativeAOT library. No .NET runtime required — the shared library is self-contained. Reading only; writing is not exposed yet.

Install (from source)

python python/scripts/build_native.py   # requires the .NET 10 SDK, once per machine
pip install -e "python[dev]"

build_native.py publishes src/ExcelReader.Native for your platform and copies the resulting ExcelReader.Native.{dll,so,dylib} into excelreader/_lib/. To point at a binary you built elsewhere, set EXCELREADER_NATIVE_LIB to its full path.

Usage

from excelreader import open_workbook

with open_workbook("book.xlsx") as workbook:
    print(workbook.sheet_count, workbook.sheet_name)
    for row in workbook.rows():
        for cell in row:
            print(cell.column, cell.type.name, cell.value)

Formats

open_workbook sniffs XLS/XLSX/XLSB by file signature. CSV has no signature, so it is chosen by the .csv extension — or explicitly:

open_workbook("data.txt", format="csv")

Dates

cell.value is always the raw text as stored, so CellType.DATE cells hold Excel serial numbers. Use Cell.as_date() to convert, passing the workbook's epoch flag:

as_date = cell.as_date(workbook.is_date1904)

as_date() returns None for any cell that isn't CellType.DATE.

Reading everything at once

rows() iterates row-by-row; read_all() materializes the whole sheet in one call:

all_rows = workbook.read_all()

This holds every row in memory at once, so prefer rows() for very large sheets.

From memory

from excelreader import open_bytes

with open_bytes(payload) as workbook:
    ...

Notes

  • A Workbook is not thread-safe. Use one per thread.
  • Empty cells are skipped, so cell.column may skip indices. Do not assume row[i].column == i.
  • The ABI is documented in src/ExcelReader.Native/include/excelreader.h.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

excelreader_native-2.1.1-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

excelreader_native-2.1.1-py3-none-manylinux_2_39_x86_64.whl (1.3 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

excelreader_native-2.1.1-py3-none-macosx_26_0_arm64.whl (1.2 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

File details

Details for the file excelreader_native-2.1.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for excelreader_native-2.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5107e3322636814c492db73311e8d0856bc9030a59e4540287640ea31a7b9321
MD5 8fc31d302f96de513440b72a67dd878d
BLAKE2b-256 eea212dada44d9afa69d81e5d66abea658d3f301920be05543a0c9078f5fd545

See more details on using hashes here.

Provenance

The following attestation bundles were made for excelreader_native-2.1.1-py3-none-win_amd64.whl:

Publisher: release.yml on GabrielMarquezMatte/ExcelReader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file excelreader_native-2.1.1-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for excelreader_native-2.1.1-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 cc4a81ee568b16400ac50312e6d0c6cc50ceb788ec68b200eeabcf7f9d91d2da
MD5 847b6b38c502332fe691a41382e8e325
BLAKE2b-256 49713acf9e182dbe5fab988741239ef316cb80fbb8b3cb319f14177e7fa90fc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for excelreader_native-2.1.1-py3-none-manylinux_2_39_x86_64.whl:

Publisher: release.yml on GabrielMarquezMatte/ExcelReader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file excelreader_native-2.1.1-py3-none-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for excelreader_native-2.1.1-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 7c811ff99dae07c037e72e9874cbc7a8e51aed77924ddd66e5cde058f4c73de4
MD5 46426bca4659b232db44437c530643cb
BLAKE2b-256 cde596a251991703a6416175d3d5dcb63931da9f9ef6283656e3155aa7483fc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for excelreader_native-2.1.1-py3-none-macosx_26_0_arm64.whl:

Publisher: release.yml on GabrielMarquezMatte/ExcelReader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.1.3

3 files

2.1.2

3 files

This release

2.1.1 This release

3 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page