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

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.2
File Size Uploaded Provenance
xlspy-0.9.2.tar.gz 405.2 kB With provenance Details

Built distributions (wheels)

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

Total release size: 4.6 MB

Release files / xlspy-0.9.2.tar.gz

Download URL xlspy-0.9.2.tar.gz
Size 405.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2174a56f8bb13bca0c0bcce8f5a9bbff067f7f4d68f735da5735fb66509e87d0
BLAKE2b-256 checksum
How to use checksums
d514b3a61a4a4855d5a3aca2a5af2e0ba2fb6c8ca846bb663b4675c7985c2fb3
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp314-cp314-win_amd64.whl
Size 303.8 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2e38a2f5606f0e0f110f0b14b489bee057ec153bb63048733d76a4cc6c2b7502
BLAKE2b-256 checksum
How to use checksums
8cab3a93d489379c3d70d4ebb4bafd97f2ae40dc4cb54589de1f98d6ca37720d
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp314-cp314-musllinux_1_2_x86_64.whl
Size 394.4 kB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
6ec160f8842ee87526423b2c93962f5dc431aa83120397e3829ead15511bf2d8
BLAKE2b-256 checksum
How to use checksums
ad84d2c243c2e818649f140673d8d676deaf807813b78133bdbe3fa60a25dc06
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 396.4 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bd6e2a1b3bb19e662522e71a0ffaa2a44392d847d8e56dd1ee2f00e7b3c01558
BLAKE2b-256 checksum
How to use checksums
130999a74f73cea12395c5b13e33e25194d752383b130ca3a3fa726783e0bf6a
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp314-cp314-macosx_11_0_arm64.whl
Size 302.0 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f6d05e39c7a409426931a3a5233d8df6449abee038c7b824558d6472b4c4919f
BLAKE2b-256 checksum
How to use checksums
192bec3bbfe1564007ca3c4283b9e6ebff872c3d1a54564b6ad62f4a435154ee
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp313-cp313-win_amd64.whl
Size 302.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
46b8684b9bff79afa0e2f8eb68ee98a0b8d6305b24c518ff90b2900ef3331a89
BLAKE2b-256 checksum
How to use checksums
bcf47d6eaa15af3bde1166e676b0d85b29057c13058baf05990a034e1b234480
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp313-cp313-musllinux_1_2_x86_64.whl
Size 394.7 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
ab2a3fb9f5d9e10d0e27d19e50352cefe87dcca4ac2f2b4739a8029979bed050
BLAKE2b-256 checksum
How to use checksums
10f6eb97e9daf7ddfd2103427bea2aab9a6ac6347290f88339fa76439470ffea
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 396.7 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
12bf7c523528fcd5cdd42031e75a00aed68c457502b6a92871e2ad4fdd705d43
BLAKE2b-256 checksum
How to use checksums
5fabece3e444e7d17164eb4d23d7b4fc1aaee698876845a2820bab10fcdbc35a
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp313-cp313-macosx_11_0_arm64.whl
Size 302.0 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01d71da426910080263e0262d974417afc06a4f58493e72f74ad0cd5a2504845
BLAKE2b-256 checksum
How to use checksums
1942370b0d0fadb309f04cc817a48386a87ab805d41484bf224a630dc75d7ab9
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp312-cp312-win_amd64.whl
Size 302.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
174280676df46e7d0cc0f819b254845a03f9694170fbc08ce6ae198341990c30
BLAKE2b-256 checksum
How to use checksums
fb186c93217d95008cb016d3d7686760c3bfb43b9d98302f8d14351137ec0044
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp312-cp312-musllinux_1_2_x86_64.whl
Size 394.7 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
6aa06ded8157fc62a39c0f769ffe5eeba9dcd3515af0bb326615025122c24db0
BLAKE2b-256 checksum
How to use checksums
c8a304a288d5af87ff9bf38a5d7f91a20fa236fc2db6c89ec4a9c6806b646421
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 396.7 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e4132143f1b60f689f3f39ce278983d643db91bee31a6e3e660b9a87ce5a7427
BLAKE2b-256 checksum
How to use checksums
ddeae862328e4f26408dd4f5ddc6d7bbb85af068b2e8f6f4bbcbc5eb2079449f
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 23, 2026.

Transparency log

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

Download URL xlspy-0.9.2-cp312-cp312-macosx_11_0_arm64.whl
Size 302.0 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
90bdd7b4617530fb8cefc11b1f0f664f7c3858bff24398d526160197e7a3f4a4
BLAKE2b-256 checksum
How to use checksums
f1e34121e7f93d2ff5d06f31b522617109a09a5ae980a36132345b209ec9402b
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 23, 2026.

Transparency log

Security for xlspy 0.9.2

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.2.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 23, 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