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 8.5-9.5x 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.

The .xlsx files themselves are written by rust_xlsxwriter — see Built on rust_xlsxwriter below.

Full documentation · Capability matrix · Changelog

Install

pip install xlsxturbo

Wheels are published for Python 3.11+ 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.

Coming from to_excel, XlsxWriter, openpyxl or polars.write_excel? The migration guide has side-by-side examples and every place the output differs.

Convert a CSV

from xlsxturbo import csv_to_xlsx

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

Types are detected from the file's text. The same conversion is available from the shell, with no Python code at all:

pip install xlsxturbo
xlsxturbo sales.csv sales.xlsx --date-order us

See CSV conversion.

Write to memory

Every export function also writes to a binary file-like object, which is what a web download or an object-storage upload needs:

import io

buffer = io.BytesIO()
df_to_xlsx(df, buffer, autofit=True)
data = buffer.getvalue()  # the complete .xlsx file

The finished file is held in memory before it is written out, including with constant_memory=True. A FastAPI example and the full rules are under Writing to memory.

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, with every library writing the same Excel table, number formats and column widths, xlsxturbo is 3.4-3.9x faster than polars, 5.7-6.5x faster than pandas + xlsxwriter, and 8.7-9.3x faster than pandas + openpyxl, measured on two Apple Silicon Macs and two Windows PCs, and needs the least memory of the four. Full tables, test systems, and methodology are on the performance page, and the benchmark scripts 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

Stable since 1.0.0. Everything reachable from import xlsxturbo without a leading underscore is covered by Semantic Versioning and will not break before 2.0.0; anything removed gets a DeprecationWarning naming its replacement and its removal version, for at least one minor release and at least six months.

The stability page is the full statement — the public surface named exhaustively, what does and does not count as breaking, and the supported Python and platform matrices.

  • Tested in CI on Python 3.11 and 3.12 across Linux, Windows, and macOS, plus Python 3.15 on Linux. One abi3 wheel per platform serves 3.11 through 3.15. Python 3.10 was dropped in 1.13.0 and Python 3.9 in 1.1.0; pip resolves an older interpreter to 1.12.2 or 1.0.0, which stay on PyPI.
  • 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.

Built on rust_xlsxwriter

Every byte of the .xlsx files xlsxturbo produces is written by rust_xlsxwriter, John McNamara's Rust Excel writer (MIT licensed). It is the one substantial dependency, and it is not an implementation detail you can ignore:

  • What xlsxturbo can do is bounded by what rust_xlsxwriter can do. The features on the capability matrix are the ones it exposes; xlsxturbo's job is type detection, the DataFrame and CSV pipeline, option validation, and a Python API — not the XLSX format itself.
  • Bugs in the generated file are usually upstream. When one is, it is reported to rust_xlsxwriter rather than papered over here — most recently #185, filed 2026-08-15 and fixed in 0.98.1 the next morning. A file Excel refuses to open is still worth reporting to us; we will trace it and take it upstream.
  • The xlsxwriter in the benchmark table is a different project — that is XlsxWriter, the pure-Python library by the same author, and one of the things xlsxturbo is measured against.

If you write Excel files from Rust, use rust_xlsxwriter directly; xlsxturbo exists to put it behind a Python DataFrame API. rust_xlsxwriter's notice, and those of every other crate compiled into the wheel, are in THIRD-PARTY-LICENSES.md, which is generated from the dependency tree rather than maintained by hand.

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 — see LICENSE.

The wheel contains compiled code from the Rust crates listed above, so their notices travel with it: THIRD-PARTY-LICENSES.md, also installed as xlsxturbo-<version>.dist-info/licenses/THIRD-PARTY-LICENSES.md. It is generated from the dependency tree by python scripts/gen_third_party_licenses.py --write; do not edit it by hand.

Metadata

Release files for xlsxturbo 1.13.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 1.13.0
File Size Uploaded Provenance Actions
xlsxturbo-1.13.0.tar.gz 615.7 kB With provenance Details for xlsxturbo-1.13.0.tar.gz

Built distributions (wheels)

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

Total release size: 7.9 MB

Release files / xlsxturbo-1.13.0.tar.gz

Download URL xlsxturbo-1.13.0.tar.gz
Size 615.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fc5a0dec835ebdf6322aed51a7e3fb7b9a6ef393846e964aeb7ff6fcf482ed80
BLAKE2b-256 checksum
How to use checksums
b11c455d4d4cae6ca9425c1c821f375645407499fb0d905769de643287e32297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / xlsxturbo-1.13.0-cp311-abi3-win_amd64.whl

Download URL xlsxturbo-1.13.0-cp311-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
82a67207c900e01f7cac628b3d21431a017dd06c700dfa72d0880e3e89511262
BLAKE2b-256 checksum
How to use checksums
beb00006b0fab890a5528da5a6eec2554845f417c78294aea337550dfdfb9f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / xlsxturbo-1.13.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL xlsxturbo-1.13.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
74ad9adfe5a72d7fd4640a018fc98b880c027c6950631ca9054a3704200e693e
BLAKE2b-256 checksum
How to use checksums
17e2e3e4124b6753822201343b48178b0436963c2e425d1d4dd6beee8bab80d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / xlsxturbo-1.13.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL xlsxturbo-1.13.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
397837c4894fc63ab6e3271ad87bee587a2e1288feee922f8c4d7bd8895eb689
BLAKE2b-256 checksum
How to use checksums
d5cf4c47a01426a00fe280d78961701752fffb0a0caa256bbe4d13132e2520e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / xlsxturbo-1.13.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL xlsxturbo-1.13.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4474e0d6a3b21cc74b0b860ce629cc11e9b61af6569a5791ef0e5541f656594c
BLAKE2b-256 checksum
How to use checksums
609111f7592b4b5b66596ac25da28d9479d0dee40d0b61d0cfd7afc0db55d58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / xlsxturbo-1.13.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL xlsxturbo-1.13.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6d6fdad3b2bf8108f9dfa485192b037127139f3edea4ba7f7c43674ea23083a2
BLAKE2b-256 checksum
How to use checksums
bc13b20396a9fc02e6f0f25466b7c36424997eb16539d7c55ae7b3b2591c8ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for xlsxturbo 1.13.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for xlsxturbo-1.13.0.tar.gz

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 Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.13.0 This release

6 release files Full provenance

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