Skip to main content

xlspy — Excel reports, made with Python

Excel reports. Python simplicity.

Turn Python data into Excel workbooks — from everyday reports to large exports.

Read and write XLSB and XLSX, bring your pandas or polars DataFrames, and refresh existing XLSM templates while preserving their macros. Style the result with charts, tables, formatting, and cell notes — all from Python.

Get started · Usage guide · Examples · Benchmarks

Built for speed

2.5 million cells. Ready in seconds.

XLSB with C acceleration Windows WSL2
Write 1.46 s 1.17 s
Read 0.60 s 0.43 s

C acceleration delivered over 10× faster XLSB reads than xlspy's pure-Python fallback in both environments. Figures are medians of three runs on a 50,000 × 50 dataset (Windows: Python 3.14.6; WSL2: Python 3.14.4). See the full comparisons, hardware, and methodology →

Made for the work behind the workbook

Your workflow What xlspy brings
Export large datasets XLSB and XLSX output from a generator or database cursor, with bounded memory via useSharedStrings=False, and C acceleration for supported read and write paths. A failed export publishes no partial workbook (failure handling).
Deliver polished reports Cell styles, number formats, formulas, dropdown validation, hyperlinks, images, print setup, charts (column, bar, line, pie, scatter), tables, and conditional formatting. XLSX-only features are listed in the feature support table.
Work with DataFrames Export pandas or polars data directly to either format.
Refresh a familiar template Replace data in XLSB, XLSX, or XLSM while keeping workbook structure, styles, and unrelated sheets.
Connect a data pipeline Read rows as a generator and stream updates from a database cursor.

The core library has no required Python package dependencies. Add pandas or polars support when you need it. Microsoft Excel is not required for the core read and write APIs.

Quick start

Requires Python 3.12 or newer.

pip install xlspy

Create a report with a styled header and formatted values:

from xlspy import F, Style, XlsxWriter

with XlsxWriter("sales.xlsx") as workbook:
    workbook.add_sheet("Sales")
    workbook.write_sheet(
        [
            ["Product", "Revenue"],
            ["Coffee", (12500, F.THOUSANDS_SEP)],
            ["Tea", (8400, F.THOUSANDS_SEP)],
        ],
        header_style=Style(bold=True, fill="#183C52", font_color="#FFFFFF"),
    )

For binary Excel output, use XlsbWriter and a .xlsb filename with the same API. Explore formatting, charts, and tables when your report needs more detail.

Bring your data. Keep your workflow.

Already using pandas or polars? Export with to_xlsx(df, "report.xlsx") or to_xlsb(df, "report.xlsb"). See DataFrame examples →

Have an Excel template? Refresh its data with XlsxUpdater, XlsbUpdater, or XlsmUpdater. XLSM updates preserve the existing VBA project. Update a workbook →

Need to read the results? Use ExcelReader for XLSB and XLSX, with the same API for both formats. Read a workbook →

Explore further

Resource What you will find
Usage guide Detailed examples, API options, and format support limits.
Runnable examples Scripts for reports, DataFrames, and workbook updates.
Benchmarks Read and write comparisons, dataset details, and reproduction commands.
Validation Windows and WSL2 test results, compatibility checks, and known limitations.
Test suite How to run tests and measure coverage.
Changelog Releases, improvements, and fixes.

MIT licensed · PyPI · Source and issues

Metadata

Release files for xlspy 0.8.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 xlspy 0.8.0
File Size Uploaded Provenance
xlspy-0.8.0.tar.gz 311.2 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for xlspy 0.8.0
File
xlspy-0.8.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
xlspy-0.8.0-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
xlspy-0.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
xlspy-0.8.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
xlspy-0.8.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
xlspy-0.8.0-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
xlspy-0.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
xlspy-0.8.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
xlspy-0.8.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
xlspy-0.8.0-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
xlspy-0.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
xlspy-0.8.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 3.8 MB

Release files / xlspy-0.8.0.tar.gz

Download URL xlspy-0.8.0.tar.gz
Size 311.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f04cc02b85fc1cef2be6185d3c75a4bfc3bf77b83b73bcd51eeaf8ae599ceabe
BLAKE2b-256 checksum
How to use checksums
951877ae76b81764220e2ef3bb22c8d0ada473af43b531a6a86a5e912b7a3931
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp314-cp314-win_amd64.whl

Download URL xlspy-0.8.0-cp314-cp314-win_amd64.whl
Size 248.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
d94ff340821f2e30a1715878df9188b66bf4537f1158a19301e444754dcda922
BLAKE2b-256 checksum
How to use checksums
95513b2b27d074ce021a50b80bae23f391367b3f9068474e618ab5262ba20ff7
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.0-cp314-cp314-musllinux_1_2_x86_64.whl
Size 326.5 kB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
f56f2594fe6fd45aece5e9bbd56fb742850a0c051ea15086d69d743b3da35a4b
BLAKE2b-256 checksum
How to use checksums
46b018ecbae6765fe006d395e7f4c5f267c946efc694e62c55adede8ddce3ae9
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 327.7 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
73d317748880be7e2da1f252d431538743fdc8901266e39a021049af9e517ce0
BLAKE2b-256 checksum
How to use checksums
905733a75d8988604edbc65297b7dd436e3d2b7e664b367f11ac4092fcc64ed1
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL xlspy-0.8.0-cp314-cp314-macosx_11_0_arm64.whl
Size 246.8 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
736980b163379eff909f6863dec81a83ee65df2ad41e8fc8f021562d284f14d2
BLAKE2b-256 checksum
How to use checksums
bc652f15447cf6ca7c100a9d32e51dd0b735015a31f128b709daab4977f89e54
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp313-cp313-win_amd64.whl

Download URL xlspy-0.8.0-cp313-cp313-win_amd64.whl
Size 247.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a8f3874e1ccd0a0c4d7dab8a49f2e83a0641e8538e322fe3039a11caac73473d
BLAKE2b-256 checksum
How to use checksums
8d51c18d29cb539790ac0058540a53ec330beab2ef527d2fb964a745f56c2be6
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.0-cp313-cp313-musllinux_1_2_x86_64.whl
Size 326.7 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
ab8ea1f5daf0cc6b53ad409e2eada46ed643052d9f6956fc0bb0b1b8273e49dc
BLAKE2b-256 checksum
How to use checksums
996cb77ef7f4aac4e19f7e4e06585ca56dbcd398596df98b4a241f8087e90c25
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 328.0 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ddacc49357346224be8d7e9ca6e5ab2ebd5df7d52ec4dcba832072da025fd927
BLAKE2b-256 checksum
How to use checksums
7c1360b423c7eda1ecfaed8392f7259512c024df81c9626f609e7895fba68ce6
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL xlspy-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
Size 246.9 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6dc5dfc6efeab87f031220beb4e701baba61083ccb7ddc059b53425859f47405
BLAKE2b-256 checksum
How to use checksums
9f7a253709f552140c4189afcb635f6b3d9e2610a1a01ed7aef31815407b6281
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp312-cp312-win_amd64.whl

Download URL xlspy-0.8.0-cp312-cp312-win_amd64.whl
Size 247.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
3edba342bf2a545f072e707e57cc520fd0b9c0372fd51061260f5473ac7c48f6
BLAKE2b-256 checksum
How to use checksums
803b1d81207ad7adbdafd1c308a8e9fa8cd45f85b8b3f93307cd43419228380c
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.0-cp312-cp312-musllinux_1_2_x86_64.whl
Size 326.7 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
9dd14cced8e81054d2cf3c656a8a52c0da8efe13d83941e802ab13ff89de5406
BLAKE2b-256 checksum
How to use checksums
7be05245da24e3685310837532379a73d19a173d26826610ccc0fe82b8495ce1
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 327.9 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c8d79b8e0a76655898915b3e8d7212874b8a3f5d6511b882e99419170e1132ad
BLAKE2b-256 checksum
How to use checksums
7525fd7d86bc5c5b8913fba9d3e590d4fcfea5b959c175a710f5f4ce60f6aa13
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 Oct 21, 2026.

Transparency log

Release files / xlspy-0.8.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL xlspy-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
Size 246.9 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
af996630e0a726fa8b6a2e65282b5eeec7b5c389983fccaa554d6cf8d97daf09
BLAKE2b-256 checksum
How to use checksums
72e73e05c697bc44ac4903bc813f7f4aea35b0ca4f316b8766b0051bb87768cc
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 Oct 21, 2026.

Transparency log

Security for xlspy 0.8.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 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for xlspy-0.8.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 Oct 21, 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.

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