Skip to main content

xlsxturbo

High-performance Excel writer with automatic type detection. Written in Rust, usable from Python.

CI PyPI Python License: MIT

xlsxturbo exports pandas and polars DataFrames and CSV files to .xlsx. It uses Rust for the hot path and keeps the Python API small enough to drop straight into a script, a report job, or a batch pipeline. Roughly 7-9x faster than pandas + openpyxl on the reference benchmarks, with the Excel features those exports usually need — tables, conditional formatting, charts, data validation, images — available as focused keyword arguments rather than a workbook object model.

Full documentation · Capability matrix · Changelog

Install

pip install xlsxturbo

Wheels are published for Python 3.9+ on Linux, Windows, and macOS. There are no runtime dependencies beyond the interpreter.

Export a DataFrame

import pandas as pd
from xlsxturbo import df_to_xlsx

df = pd.DataFrame({
    "product": ["Widget", "Gadget", "Gizmo"],
    "price": [19.99, 34.50, 8.75],
    "in_stock": [True, False, True],
    "restock": pd.to_datetime(["2024-03-01", "2024-03-15", "2024-04-01"]),
})

df_to_xlsx(df, "products.xlsx", table_style="Medium2", autofit=True)

Types carry across without configuration: numbers stay numbers, booleans become Excel booleans, and dates and datetimes become real Excel date values with a display format attached. polars DataFrames work the same way — neither library is a dependency.

Convert a CSV

from xlsxturbo import csv_to_xlsx

csv_to_xlsx("sales.csv", "sales.xlsx")

Types are detected from the file's text. There is also a command-line tool for the same job, though it is not included in the PyPI wheel — it has to be built from source. See CSV conversion.

What it can do

  • DataFrame and CSV export — pandas, polars, and CSV in, .xlsx out
  • Excel tables with 61 built-in styles, autofilter, and banded rows
  • Formatting — header and per-column styles, number formats, per-side borders, alignment, wrapping, auto-fit and explicit column widths, row heights, merged ranges, rich text
  • Conditional formatting — colour scales, data bars, icon sets
  • Formulas — calculated columns and workbook-level defined names
  • Native Excel charts and in-cell sparklines, both editable in Excel
  • Data validation — dropdowns, numeric ranges, text-length constraints
  • Cell-level extras — arbitrary cell writes, hyperlinks, comments, checkboxes, images, textboxes
  • Multi-sheet workbooks with per-sheet option overrides
  • Constant memory mode for very large exports, and optional parallel CSV parsing
  • Atomic writes — a failed export never truncates the file already at that path

The capability matrix is the authoritative list: it is generated from the source and shows which options each function accepts, which are overridable per sheet, and which survive constant-memory mode.

Performance

On 100,000 rows x 50 columns of mixed types, xlsxturbo is about 4.6x faster than polars, 7x faster than pandas + xlsxwriter, and 9.3x faster than pandas + openpyxl. Absolute timings are system-specific; the ratios are stable. Full tables, test systems, and methodology are on the performance page, and both benchmark suites live in benchmarks/ so you can measure your own hardware.

Known limitations

  • Write-only. xlsxturbo creates workbooks; it cannot open or modify an existing one.
  • Timezone-aware datetimes are written as their local wall-clock value — Excel has no timezone concept, so the UTC offset is not preserved.
  • Integers above 2^53 are written as text to avoid silent precision loss.
  • Durations (Timedelta / timedelta64) are written as text; Excel has no duration type.

The compatibility page has the complete list with the workaround for each.

Project status

  • Production-ready for the documented DataFrame and CSV export workflows.
  • Tested in CI on Python 3.9 and 3.12 across Linux, Windows, and macOS, plus Python 3.14 on Linux.
  • SemVer: breaking API changes require a major version bump.
  • Advanced Excel features are exposed through focused parameters rather than a full workbook object model. That is a deliberate scope boundary, not a gap to be filled.

Contributing

Setup takes about five minutes and is described in CONTRIBUTING.md, along with the exact lint, type, and test commands CI runs. Security reports go through the process in SECURITY.md.

License

MIT

Release files for xlsxturbo 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlsxturbo 0.20.0
File Size Uploaded
xlsxturbo-0.20.0.tar.gz 341.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for xlsxturbo 0.20.0
File
xlsxturbo-0.20.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
xlsxturbo-0.20.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
xlsxturbo-0.20.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.1 MB

Release files / xlsxturbo-0.20.0.tar.gz

Download URL xlsxturbo-0.20.0.tar.gz
Size 341.7 kB
Tags Source
SHA-256 checksum
How to use checksums
749fd89e8a2efedd49b8d2fbc98cced2b9ff089033eb56f019b1871149677500
BLAKE2b-256 checksum
How to use checksums
867fd26a86bf8c273c30691201b5c94b4883ab267ab5e3c603b5b32466ccadb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / xlsxturbo-0.20.0-cp39-abi3-win_amd64.whl

Download URL xlsxturbo-0.20.0-cp39-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d219f811ce57d4b6fd013bb360546b3b0d18eef56243a6dfc4bf06fe882b7a01
BLAKE2b-256 checksum
How to use checksums
f14e2582ae3738b644394689111eca09febb589e458dc4fd8f29f1ece3b72768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
22e7ee54b4c77442cdac03c8cab179174c279cadb49a3bfb54deaf4cd7c67db7
BLAKE2b-256 checksum
How to use checksums
bba2cfc08927aa200b105fe8290e82f3e324429ef53d5955b6a4d39381acb40a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL xlsxturbo-0.20.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
9c8e83cacd1a55ff248e7cfdfddf08df63de70c0ec163a28298dbf5907f08190
BLAKE2b-256 checksum
How to use checksums
78d3940a6081a76356e42d81a00092a9026ddf5df9058adc2b82301174b25431
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / xlsxturbo-0.20.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL xlsxturbo-0.20.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
707dc6aa4dfa30d4a52a3824346ca3a016e961e8437baa67c86ef2f76649bc18
BLAKE2b-256 checksum
How to use checksums
f09cce9885a079286b1f72fa993acc7183e638a1914355dd151af0b14e95cbb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / xlsxturbo-0.20.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL xlsxturbo-0.20.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d07ea9df684a320a143eff068b7be1588d255cecaa6965c6ab79b1f008a1e3f0
BLAKE2b-256 checksum
How to use checksums
2cf212fcbd037912ba4f568511cc3dc0db2da788749886dd98b69add122dabaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

1.6.0

6 release files

1.5.1

6 release files

1.5.0

6 release files

1.4.1

6 release files

1.4.0

6 release files

1.3.0

6 release files

1.2.0

6 release files

1.1.2

6 release files

1.1.1

6 release files

1.1.0

6 release files

1.0.0

6 release files

0.21.0

6 release files

This release

0.20.0 This release

6 release files

0.19.1

6 release files

0.19.0

6 release files

0.18.0

6 release files

0.17.2

6 release files

0.17.1

6 release files

0.16.2

6 release files

0.16.1

6 release files

0.16.0

6 release files

0.15.5

6 release files

0.15.1

6 release files

0.15.0

6 release files

0.14.1

6 release files

0.14.0

6 release files

0.13.0

6 release files

0.12.5

6 release files

0.12.3

7 release files

0.12.2

6 release files

0.12.1

6 release files

0.12.0

6 release files

0.11.0

6 release files

0.10.6

6 release files

0.10.4

6 release files

0.10.3

6 release files

0.10.1

6 release files

0.9.0

6 release files

0.8.0

6 release files

0.7.0

8 release files

0.6.0

8 release files

0.4.1

8 release files

0.4.0

8 release files

0.3.0

8 release files

0.1.0

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page