Skip to main content

High-performance framework for layout-resilient Excel table extraction

Project description

Tabularix Logo

Smart, layout-resilient data extraction from Excel documents.


Tabularix

Tabularix is a high-performance framework designed to identify, extract, and organize "hidden data" trapped in fragmented, messy Excel files. It transforms highly variable visual spreadsheets into clean, structured formats (such as Apache Arrow tables, Pandas DataFrames, or Polars DataFrames) at native speeds.

Developed as a direct continuation of the Archery framework, it combines a blazing-fast Rust core engine with ergonomic Python scripting bindings to enable powerful "Configuration as Code" recipes.


🚀 Installation

Install the stable package from PyPI:

pip install tabularix

💡 Quick Example

The Scenario

Suppose we have a spreadsheet containing a sales report table surrounded by empty rows, headers, and metadata, as shown in the layout analysis below:

Multi-tables Worksheet Layout

Instead of hardcoding static cell coordinates (e.g., A3:E8) which break when columns or rows are added, deleted, or shifted, Tabularix uses Range Matchers to dynamically locate table boundaries relative to their visual markers.

The following example shows how to define the header and data patterns, locate the table, and export it:

import polars as pl
from tabularix import (
    extract_table_with_header_and_data,
    grid,
    group,
    load_workbook,
    non_empty,
    regex,
    value,
)

# 1. Load the workbook and get the target worksheet.
workbook = load_workbook("tests/data/sample.xlsx")
sheet = workbook.get_sheet("complex")

# 2. Define the header row pattern (starts with "Region", then 4 Quarters matching Q1-Q4 regex).
header_pattern = group(
    value("Region"),
    regex(r"^Q[1-4]$").repeat(min=4, max=4)
)

# 3. Define the data row pattern (region name, then 4 non-empty numeric quarter cells).
data_pattern = grid(
    group(
        regex(r"^(?!Total).*$"),  # Match any string except "Total" (the footer marker).
        non_empty().repeat(min=4, max=4)
    ).one_or_more()
)

# 4. Extract the structured Table with dynamic coordinate scanning.
table = extract_table_with_header_and_data(
    sheet,
    header_pattern,
    data_pattern,
    clean_names=True
)

# 5. Export zero-copy to a Polars or Pandas DataFrame.
df = pl.from_arrow(table.to_arrow())
print(df)

📖 Documentation

For full guides, detailed tutorials, and API reference, please visit our Official Documentation Site.


⚡ Core Features

  • High-Performance Rust Core: Performs CPU-heavy Excel manipulation, boundary scanning, and cell matching at native speeds.
  • Privacy-First & Secure: Runs entirely locally on your hardware. No external APIs or third-party servers are queried.
  • Python Ergonomics: Natural integration with standard Python tools, dynamic typing support, and full PEP 8 compliance.
  • Zero-Copy FFI: Seamless exports to Apache Arrow tables, Pandas, Polars, and DuckDB.

🤝 Contributing

Contributions are welcome! Please read our Development Guidelines (or the root CONTRIBUTING.md) for details on local environment setup, testing, formatting checks, and repository workflows.


⚖️ License

Tabularix is dual-licensed under the Apache 2.0 and MIT licenses.

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tabularix by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.

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

tabularix-0.4.0.tar.gz (687.9 kB view details)

Uploaded Source

Built Distributions

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

tabularix-0.4.0-cp312-abi3-win_amd64.whl (768.4 kB view details)

Uploaded CPython 3.12+Windows x86-64

tabularix-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

tabularix-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (971.8 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

tabularix-0.4.0-cp312-abi3-macosx_11_0_arm64.whl (879.7 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

tabularix-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl (898.7 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file tabularix-0.4.0.tar.gz.

File metadata

  • Download URL: tabularix-0.4.0.tar.gz
  • Upload date:
  • Size: 687.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tabularix-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1d9fc1ce0cf874058c082795b43bb8258921414f3239dd5fbbeeb5dc3c5d997a
MD5 d48af297cb5e0fc244020c3d83df45ec
BLAKE2b-256 37d4bd83cebdec6ca1564126d57e1df1995af7ebca70c6c7588163439f6044ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0.tar.gz:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.4.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: tabularix-0.4.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 768.4 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tabularix-0.4.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bffa47ee08de595083dde50c075f2fb56d7188cfc87e6586c8c13016162f83d6
MD5 45ea281201bc9fbee39fc018762c4487
BLAKE2b-256 60e1075aa3c9ebef1d49c3f6670fdace413906ad134e25377c64f732d27849a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0-cp312-abi3-win_amd64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e16906c311d43e4fd14dc75641b2c84cfdc1ec918eddeff5194b0de0366e8b69
MD5 d27044a3ac336a658abf75f771223d89
BLAKE2b-256 d314cd378f3686e8fd4e27dc92f9b0633a3b5583f11d63f330b57e756dacb787

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0-cp312-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tabularix-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 db07c8f0402174e61fae17f7b21f85f87f16beb1d6c9675dca09c6a057188406
MD5 c272fdc30b259a414bb09d94aa4c667f
BLAKE2b-256 9b623b66eae97890d69036c92999b9e113fc58d43b169e45d41f3c0172e36be8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.4.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tabularix-0.4.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8708d6bdb14e310899e79a64d45d8e0d58b7ec7e79c521b87cc493c8084b0a1a
MD5 45ebe806f40b81c8409868a467ab4bd0
BLAKE2b-256 70b996d5f0c0126739d829e2df358af04bf436c06baad7fcb68d30e8d9772080

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8a1c0df0d94b385f6a6639d2a28f63fe66bb4267fcef7dcfdc37c68629257aa0
MD5 c67db45114c11fac7e7691c6d872ac44
BLAKE2b-256 5623a1b77109bd720905bce6402c93ce2930a88b015730a8c148fdbac54b266c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.4.0-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on pcasteran/tabularix

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

Supported by

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