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.3.4.tar.gz (669.0 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.3.4-cp312-abi3-win_amd64.whl (741.8 kB view details)

Uploaded CPython 3.12+Windows x86-64

tabularix-0.3.4-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.3.4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (941.2 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

tabularix-0.3.4-cp312-abi3-macosx_11_0_arm64.whl (865.5 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

tabularix-0.3.4-cp312-abi3-macosx_10_12_x86_64.whl (877.8 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tabularix-0.3.4.tar.gz
Algorithm Hash digest
SHA256 19fa1a069f3c21b25ccff029615a40f80e6f430e86dee6ee43564c1e6687eace
MD5 dce3becec06109ff90362ba5fcd667e6
BLAKE2b-256 08b0737cff869877168ad885083efd1f1284db14865ddbd9e2c624bbf26a1aae

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4.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.3.4-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: tabularix-0.3.4-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 741.8 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.3.4-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3a893a437a7fdd0939880f5cda4f58d2a98c6218f7220dbb65857ecfbc648cdb
MD5 7e164548a088efafa8df8238d5036e47
BLAKE2b-256 e9593e9c620a3053b3474fd88c3785833a7eedc0ba64fc1b63446f8c9cfbb2d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4-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.3.4-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.4-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 055cd5e34c7d173f280a50318e22573ca0feaf4e87dbd35829eb0f64b188c474
MD5 5a65d80c5967a57a770b39ed9ee5bb81
BLAKE2b-256 7fc328803f80f48b37e6e06f0cea8aed539e82c304eb7af713e0da7f95a1234b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4-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.3.4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.4-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1bde31b22148a61c50a975d9da5e542bca2f89b4e51467bd574605c96716c76e
MD5 644303fcec53d35fec2b0c6a83c6b04f
BLAKE2b-256 e37a0c936eb893531db854fe7fb010f2048522db50d65c041b4b514485399b80

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4-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.3.4-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.4-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71126f164e660c27e9d3becca7934091bad9de95b3a87eb26607732994f2cbfd
MD5 9936ded28a0b5181d0e245687ea168b0
BLAKE2b-256 0b22db20168600ccdad00e5db5402fc7edf2b8c9eac87316e91c4acbed3e3725

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4-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.3.4-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.4-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 00e45852b265ea796b33ef9aa52bdf7c8e98e0bdeca185d56b362a40d13f9e96
MD5 4a0a72da614ac1fa9cb2a3ce8f560fe5
BLAKE2b-256 01a54e2b5b802338f8f9bc867f18ff743891013fd851c11871620427d12c0e04

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.4-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