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, area, pie, doughnut, scatter, stacked), tables, and conditional formatting. Both XLSX and XLSB support them; see 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.9.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.9.1
File Size Uploaded Provenance
xlspy-0.9.1.tar.gz 397.6 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for xlspy 0.9.1
File
xlspy-0.9.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
xlspy-0.9.1-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details
xlspy-0.9.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.9.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
xlspy-0.9.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
xlspy-0.9.1-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
xlspy-0.9.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.9.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
xlspy-0.9.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
xlspy-0.9.1-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
xlspy-0.9.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.9.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 4.5 MB

Release files / xlspy-0.9.1.tar.gz

Download URL xlspy-0.9.1.tar.gz
Size 397.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9eff305f32c9806f645e7ea0482c30b04674ccc5e2652f9aa0dd77dbe1f4b572
BLAKE2b-256 checksum
How to use checksums
cf2dfa8fc8cc2339426ea85be065bd9f58fcae8a74adba53999e19777075194c
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp314-cp314-win_amd64.whl
Size 299.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
42db3577d3991317faaf16faf9f981aac74d843e522bf9c77a2dbfefb4433e79
BLAKE2b-256 checksum
How to use checksums
cbed877f1e6ba7876035d74392bb13a698dfbb17cdd88e88d6eda603ed02831f
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp314-cp314-musllinux_1_2_x86_64.whl
Size 389.9 kB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
f06adc03ab3b6f9619e9a57582f286829f250527ce0733f6170736eb53517bf5
BLAKE2b-256 checksum
How to use checksums
991d77d36cfb245ddb6db28fcce6b2ace31112329ce9be0aa16abe7ddf6d45a0
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 391.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
6b9a04c489a6d46a333303148e4b8cc0fd7214e75f88f409f434cdefa285c10d
BLAKE2b-256 checksum
How to use checksums
f8c0ae13773bba29305eda9bc5fa0f4fca1a5d031e89a4e834c6dc09ad17d173
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp314-cp314-macosx_11_0_arm64.whl
Size 297.4 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ee9686a290c32beb611d27c0f1f9a45f2a7a3eb17e653a16cfce7df090e99212
BLAKE2b-256 checksum
How to use checksums
c8902c49722f661b8a99e9ef0269da522ab5836f287aea9714dd4b338dd473eb
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp313-cp313-win_amd64.whl
Size 298.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
2c5154b52b611270f7b969be21de171b7594e54dfe0b94176ff7a9aa1b147932
BLAKE2b-256 checksum
How to use checksums
3f7e3fedd0f4a9cd38d29e7bbb901e9db7ccf260d8db00509777a5f265699efd
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 390.0 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
2d727051db6b5d18d663ff5892fb9d1ab30c051a90c781fb5e8e193043cd19e0
BLAKE2b-256 checksum
How to use checksums
74493fff2f4017bfb670b50430dc77697fc744a612079dbf9ad1f9a4297b29e0
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 391.9 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
41aaa85be49bb3965f5a02c0385673b8a5174ff6a7d94de779438367b083a1e4
BLAKE2b-256 checksum
How to use checksums
f291c107a66ff09a70fa70643e926746d334ae54f5f4facdd8eedb0656ebc388
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp313-cp313-macosx_11_0_arm64.whl
Size 297.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b0aad82783d81e96d9675e651b5021d4c4f43347769523160dff918a74085a61
BLAKE2b-256 checksum
How to use checksums
02c28e43806505a929210dc25dd9e757fd7558d92b4bb946e4a8c34af2c106fe
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp312-cp312-win_amd64.whl
Size 298.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7345034d013fc966b929991c08dc889a5d0196ff9b0784a21337bb919490d2d1
BLAKE2b-256 checksum
How to use checksums
de59cafd91893509f0a05a3d71788c39f08d46a468104543b4b62e990dee1f6a
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 390.0 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
e05c96066a34f8c1fd9c3c861b3e4ff1570ab0a5a7166eb295d675876518b58f
BLAKE2b-256 checksum
How to use checksums
a274aaf863cc5d078f2ed6ab2cf5667fc820c56db55c30d1978262476b4b3780
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 391.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
8fa4a7d01fb529cc6f49fd8ebc920f8fef5fe8f1f2df2be794600056cb60dac3
BLAKE2b-256 checksum
How to use checksums
98a8a84f5dab2493d21257a07afe013c8c76ebd3f8cd17287b724c453c8fb3dd
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 22, 2026.

Transparency log

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

Download URL xlspy-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Size 297.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d930f8b1c7be1a65a44e51eb13240b9a20cde72c3939cc62d51ab85fc3b72d0d
BLAKE2b-256 checksum
How to use checksums
9720b5c7543bfeca57b209c958d25ed2bf6c4dcea2617f75da709d79224e825b
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 22, 2026.

Transparency log

Security for xlspy 0.9.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.9.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 22, 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