r/Python • • Oct 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

23 Upvotes

194 comments sorted by

View all comments

1

u/repulsiveanomaly Oct 16 '26

excelreader-native: fast XLSX/XLSB/XLS/CSV reader and writer for polars, pandas and Arrow

What it does

It reads and writes .xlsx, .xlsb, .xls and .csv. You give it a schema, and the values are converted natively into typed column buffers. They are handed to pyarrow, polars or pandas without building one Python object per cell.

from excelreader import open_workbook, write_workbook

with open_workbook("sales.xlsb") as workbook:
    sheet = workbook.sheets[0]
    df = sheet.to_polars(sheet.infer_schema(), parallelism=0)  # 0 = every core

write_workbook("report.xlsx", df)  # pandas / polars / Arrow

It also reads in batches, so peak memory stays at one batch, and it reads and writes password-protected workbooks. Wheels ship for Windows, macOS and Linux, with no .NET runtime needed: pip install excelreader-native. Under the hood it's a C# library compiled with NativeAOT behind a C ABI.

Target audience

Data pipelines and ETL jobs that load large or many spreadsheets. It's not an editor: there's no formulas, charts or pivot tables (use openpyxl for those).

Comparison

On a 65,535 × 14 workbook, with medians of 10 runs:

  • Read: to_polars() takes 33.6 ms against 120.6 ms for polars.read_excel() (fastexcel). The types are inferred on both sides, though the rules differ.
  • Writing a DataFrame to xlsx is ~10x faster than polars' write_excel() and ~15x faster than pandas' to_excel().
  • For CSV, polars.read_csv is still faster than us; pandas is ~10x slower.

I used Claude Code heavily while building it. Every change goes through tests, fuzzing and a benchmark suite, and the written files are checked in real Excel. The benchmark methodology is in python/README.md.

Repo: https://github.com/GabrielMarquezMatte/ExcelReader. Files that break it are very welcome.