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.1

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.1
File Size Uploaded Provenance
xlspy-0.8.1.tar.gz 312.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for xlspy 0.8.1
File
xlspy-0.8.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
xlspy-0.8.1-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
xlspy-0.8.1-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details
xlspy-0.8.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
xlspy-0.8.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
xlspy-0.8.1-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
xlspy-0.8.1-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details
xlspy-0.8.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
xlspy-0.8.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
xlspy-0.8.1-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
xlspy-0.8.1-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.1-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.1.tar.gz

Download URL xlspy-0.8.1.tar.gz
Size 312.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c48ff5cea1703e228f7848a1b56d518cb0929a96e9ffb64a19c3789077523a27
BLAKE2b-256 checksum
How to use checksums
69140cce69da02ce4da68de329720491a6d4363420ecd45980b0a81d60cb84cd
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.1-cp314-cp314-win_amd64.whl

Download URL xlspy-0.8.1-cp314-cp314-win_amd64.whl
Size 248.8 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
e049bd11d18bb44c2deb807a306c626a4889d796442f396c74a58194f7ce85ff
BLAKE2b-256 checksum
How to use checksums
d9b7a7159d3e7e4053a5a3c16c736d0e32973f7c0e8520e005085867991732f4
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.1-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.1-cp314-cp314-musllinux_1_2_x86_64.whl
Size 326.8 kB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
3d6868135a704b4d8cf14d0170a8b1f9245532838f88b1349b7a4cefc9957c27
BLAKE2b-256 checksum
How to use checksums
d8d0bbc0d09baa040f78440f2810e994ccfe11a1c7ff2034e0cf804cdff551f0
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.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 327.9 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
40f8cbcad86b0cf73a45d9399e1ca07560f9d04d72d1629c9a98a71e4138c22a
BLAKE2b-256 checksum
How to use checksums
cbef9bd1ed9e38400242d9d4d1de81c405fba788e9b2d9564003bb2177acc9f5
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.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL xlspy-0.8.1-cp314-cp314-macosx_11_0_arm64.whl
Size 247.1 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
78b077acd6639495faaeb624088827061e03854258a765583294963e5514168c
BLAKE2b-256 checksum
How to use checksums
fdc62686f93a38d23259852b66ccc39e078ae0d46b27919fa917e2aa850bbd3d
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.1-cp313-cp313-win_amd64.whl

Download URL xlspy-0.8.1-cp313-cp313-win_amd64.whl
Size 247.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
369a3d546de6e833ae256789b607914c2e109ee5c0d45aa38bd15dddcf52c894
BLAKE2b-256 checksum
How to use checksums
bf43fe710283e9e8c5b31b3f72d6c28b51a78e8a87929fff1b12e20cef900372
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.1-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 326.9 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
857638fb38faf992dde865442b6489f030dedb13c6af1ca514b69084c323eed8
BLAKE2b-256 checksum
How to use checksums
cbcbfb142c247059bef5ec162215398df9f7904d4b5ab4138e97b70c4e642b39
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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 328.2 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b4c4b5d0fac3b2761cf24b650772ace9d7f904fe939cb04c077c48cf23e5c627
BLAKE2b-256 checksum
How to use checksums
e9e025a66b13a9f1d5896a3851458f48173b7a30d5532199e3265d32f67cd321
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.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL xlspy-0.8.1-cp313-cp313-macosx_11_0_arm64.whl
Size 247.1 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
05c23a43e113d69cd024e0847458344205b7ae085419750e0cc253b50ae84ac7
BLAKE2b-256 checksum
How to use checksums
f81525aed4fbf1638bac465788ee689dc7adfea22b5a95933693a849f98ea58b
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.1-cp312-cp312-win_amd64.whl

Download URL xlspy-0.8.1-cp312-cp312-win_amd64.whl
Size 247.9 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2246bd5206b5a0847aae09fa8eb5123452d05da33623331774991dd262a207e0
BLAKE2b-256 checksum
How to use checksums
a1d94c8b9e706a7fb93c9ce4521e04be182da53bcc26f606322b301cffc7adcf
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.1-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL xlspy-0.8.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 326.9 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
3ec902b8871e7137345ec194af9ea9b8eb8eee5af78702c51984f8ea83a8b443
BLAKE2b-256 checksum
How to use checksums
e7c2b0832f943a468d076dc622a535b0e1641ea11291ceac99d6552d7e184de4
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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL xlspy-0.8.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 328.2 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
69bc461369761e6cc78923cd657e34e2be1cba8fb42c6fbc91b7082b2c8876b1
BLAKE2b-256 checksum
How to use checksums
7e6e7ede68c2ca6ede44be9e9aceb7ad640e897ca01f2f33178d1d8079a81078
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.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL xlspy-0.8.1-cp312-cp312-macosx_11_0_arm64.whl
Size 247.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
997cba71a9fb2365d60c5d281878a445f6c2393d1c97fcaa7e43c3c9b945eb49
BLAKE2b-256 checksum
How to use checksums
e5ac3bb9f655f99981c7e02239773a26bb750922538af6ff3f555452236d4936
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.1

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.1.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