High-performance Excel writer with automatic type detection (pandas, polars, CSV)
Project description
xlsxturbo
High-performance Excel writer with automatic type detection. Written in Rust, usable from Python.
Features
- Direct DataFrame support for pandas and polars
- Excel tables - filterable tables with 61 built-in styles (banded rows, autofilter)
- Auto-fit columns - automatically adjust column widths to fit content
- Freeze panes - freeze header row for easier scrolling
- Multi-sheet workbooks - write multiple DataFrames to one file
- Parallel CSV processing - optional multi-core parsing for large files
- Automatic type detection from CSV strings and Python objects:
- Integers and floats → Excel numbers
true/false→ Excel booleans- Dates (
2024-01-15,15/01/2024, etc.) → Excel dates with formatting - Datetimes (ISO 8601) → Excel datetimes
NaN/Inf→ Empty cells (graceful handling)- Everything else → Text
- ~25x faster than pandas + openpyxl
- Memory efficient - streams data with 1MB buffer
- Available as both Python library and CLI tool
Installation
pip install xlsxturbo
Or build from source:
pip install maturin
maturin develop --release
Python Usage
DataFrame Export (pandas/polars)
import xlsxturbo
import pandas as pd
# Create a DataFrame
df = pd.DataFrame({
'name': ['Alice', 'Bob'],
'age': [30, 25],
'salary': [50000.50, 60000.75],
'active': [True, False]
})
# Export to XLSX (preserves types: int, float, bool, date, datetime)
rows, cols = xlsxturbo.df_to_xlsx(df, "output.xlsx")
print(f"Wrote {rows} rows and {cols} columns")
# Works with polars too!
import polars as pl
df_polars = pl.DataFrame({'x': [1, 2, 3], 'y': [4.0, 5.0, 6.0]})
xlsxturbo.df_to_xlsx(df_polars, "polars_output.xlsx", sheet_name="Data")
Excel Tables with Styling
import xlsxturbo
import pandas as pd
df = pd.DataFrame({
'Product': ['Widget A', 'Widget B', 'Widget C'],
'Price': [19.99, 29.99, 39.99],
'Quantity': [100, 75, 50],
})
# Create a styled Excel table with autofilter, banded rows, and auto-fit columns
xlsxturbo.df_to_xlsx(df, "report.xlsx",
table_style="Medium9", # Excel's default table style
autofit=True, # Fit column widths to content
freeze_panes=True # Freeze header row for scrolling
)
# Available styles: Light1-Light21, Medium1-Medium28, Dark1-Dark11
xlsxturbo.df_to_xlsx(df, "dark_table.xlsx", table_style="Dark1", autofit=True)
Multi-Sheet Workbooks
import xlsxturbo
import pandas as pd
# Write multiple DataFrames to separate sheets
df1 = pd.DataFrame({'product': ['A', 'B'], 'sales': [100, 200]})
df2 = pd.DataFrame({'region': ['East', 'West'], 'total': [500, 600]})
xlsxturbo.dfs_to_xlsx([
(df1, "Products"),
(df2, "Regions")
], "report.xlsx")
# With styling applied to all sheets
xlsxturbo.dfs_to_xlsx([
(df1, "Products"),
(df2, "Regions")
], "styled_report.xlsx", table_style="Medium2", autofit=True, freeze_panes=True)
CSV Conversion
import xlsxturbo
# Convert CSV to XLSX with automatic type detection
rows, cols = xlsxturbo.csv_to_xlsx("input.csv", "output.xlsx")
print(f"Converted {rows} rows and {cols} columns")
# Custom sheet name
xlsxturbo.csv_to_xlsx("data.csv", "report.xlsx", sheet_name="Sales Data")
# For large files (100K+ rows), use parallel processing
xlsxturbo.csv_to_xlsx("big_data.csv", "output.xlsx", parallel=True)
CLI Usage
xlsxturbo input.csv output.xlsx [--sheet-name "Sheet1"] [-v]
Options
-s, --sheet-name: Name of the Excel sheet (default: "Sheet1")-v, --verbose: Show progress information
Example
xlsxturbo sales.csv report.xlsx --sheet-name "Q4 Sales" -v
Performance
Benchmarked on 525,684 rows x 98 columns:
| Method | Time | Speedup |
|---|---|---|
| xlsxturbo | 28.5s | 26.7x |
| PyExcelerate | 107s | 7.1x |
| pandas + xlsxwriter | 374s | 2.0x |
| pandas + openpyxl | 762s | 1.0x |
| polars.write_excel | 1039s | 0.7x |
Type Detection Examples
| CSV Value | Excel Type | Notes |
|---|---|---|
123 |
Number | Integer |
3.14159 |
Number | Float |
true / FALSE |
Boolean | Case insensitive |
2024-01-15 |
Date | Formatted as date |
2024-01-15T10:30:00 |
DateTime | ISO 8601 format |
NaN |
Empty | Graceful handling |
hello world |
Text | Default |
Supported date formats: YYYY-MM-DD, YYYY/MM/DD, DD-MM-YYYY, DD/MM/YYYY, MM-DD-YYYY, MM/DD/YYYY
Building from Source
Requires Rust toolchain and maturin:
# Install maturin
pip install maturin
# Development build
maturin develop
# Release build (optimized)
maturin develop --release
# Build wheel for distribution
maturin build --release
Benchmarking
Run the included benchmark script:
# Default: 100K rows x 50 columns
python benchmark.py
# Custom size
python benchmark.py --rows 500000 --cols 100
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xlsxturbo-0.3.0.tar.gz.
File metadata
- Download URL: xlsxturbo-0.3.0.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1075b405877c0510ae32a039f38e89d01c7fe43375047045e69b2074214c9da
|
|
| MD5 |
7f5444e1f3a2c99dcd68e5fa9d87bffa
|
|
| BLAKE2b-256 |
345349034bd4e8319fe1fd55d48132e743943478550efba28c7eb256f03a549b
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0.tar.gz:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0.tar.gz -
Subject digest:
b1075b405877c0510ae32a039f38e89d01c7fe43375047045e69b2074214c9da - Sigstore transparency entry: 742734654
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 840.0 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c80ecfa25534011f2ed9040992efe6877bb472419db8aa7b79482d95a439e6a
|
|
| MD5 |
305d430465b722a1a6819b130a61a9b7
|
|
| BLAKE2b-256 |
c375ab717abd1db85e10914090c45387895d098982c0196c0a49300842eea17e
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
1c80ecfa25534011f2ed9040992efe6877bb472419db8aa7b79482d95a439e6a - Sigstore transparency entry: 742734691
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 842.6 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323ddb88ce9dc45906e223dfaccff01d29e47975c7d36d9e91805f297cdfe58d
|
|
| MD5 |
df454b72b88a82fa77e88299802957c5
|
|
| BLAKE2b-256 |
3c9bf5549765f08ffb31adae532fad94d277fb89b71110194b3f726be3fc0ec3
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
323ddb88ce9dc45906e223dfaccff01d29e47975c7d36d9e91805f297cdfe58d - Sigstore transparency entry: 742734687
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 847.8 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca4da641d4582be16bf6e9486512f3d04e5394406ba7024787c87cea8e57b903
|
|
| MD5 |
d117754275a2035f665bcbfa7885ab50
|
|
| BLAKE2b-256 |
ae6d530492de73b1da4f69fb665be6e1ce620fff8a9385aaa574ee325409731d
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-cp38-abi3-win_amd64.whl -
Subject digest:
ca4da641d4582be16bf6e9486512f3d04e5394406ba7024787c87cea8e57b903 - Sigstore transparency entry: 742734694
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 901.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e9d36bdd44a35aed6259791bfe779136e6501176cfe0a90bf7d0afe39686d9d
|
|
| MD5 |
36c2f2ddf6fb99828c81a9631ddb4db3
|
|
| BLAKE2b-256 |
0073eb4c92f26c48a32ce500f9af0a9179ba97e0dd52ed995c3cc4d0268540a5
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0e9d36bdd44a35aed6259791bfe779136e6501176cfe0a90bf7d0afe39686d9d - Sigstore transparency entry: 742734668
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 842.4 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c8d523f6bb57f0e3e3330a6dd02e2d9f4e1300657e4c5923d476ddf9e23ff04
|
|
| MD5 |
c5cbea0f5d4e2b887dd9832091f808f8
|
|
| BLAKE2b-256 |
55bbd28a86041cffb71fffdd8980b02ddeeae972db7b964bb97aa366ada39147
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
3c8d523f6bb57f0e3e3330a6dd02e2d9f4e1300657e4c5923d476ddf9e23ff04 - Sigstore transparency entry: 742734706
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 816.0 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d909484cb0e7dc3460c090f03ce486d7de507de436f468811231de4ec66e3856
|
|
| MD5 |
d620fd2a13eaa05d38c71333023e4b08
|
|
| BLAKE2b-256 |
e359549be83ad9d0ecd8bcd49698d4ad9212fac1f0963e0fd562f4083eb727d2
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
d909484cb0e7dc3460c090f03ce486d7de507de436f468811231de4ec66e3856 - Sigstore transparency entry: 742734699
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type:
File details
Details for the file xlsxturbo-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: xlsxturbo-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 860.7 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01457359c91a114f65a661396bd65082c5b0ace6d343cc95f54f7810df0c7488
|
|
| MD5 |
6737b9631c4854035dfb13582f85e27f
|
|
| BLAKE2b-256 |
d15bea9c609a6af16e447a5dbc8f68ab1e13537e575c0413bb6808019b1fb059
|
Provenance
The following attestation bundles were made for xlsxturbo-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on tstone-1/xlsxturbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xlsxturbo-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
01457359c91a114f65a661396bd65082c5b0ace6d343cc95f54f7810df0c7488 - Sigstore transparency entry: 742734678
- Sigstore integration time:
-
Permalink:
tstone-1/xlsxturbo@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tstone-1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a49d75c3ce3eff93b835e7fccaef27c1b61cea6a -
Trigger Event:
push
-
Statement type: