Skip to main content
Jetxl turns a DataFrame into an .xlsx file. It’s written in Rust, reads Arrow memory directly without copying it, and suits the case where the spreadsheet is large enough that writing it has become the slow part of your job.

0.66s for 1M rows

Against 42.5s for openpyxl on the same machine

Polars, Pandas, Arrow

Or plain Python dictionaries

Formatting included

Charts, tables, images, styles, validation

Is this the right tool?

Jetxl writes files. It doesn’t read them, and it can’t edit an existing workbook.
Exporting a large DataFrame to Excel. Generating reports on a schedule. Returning a spreadsheet from a web API. Anywhere you produce the file fresh each time and write speed matters.
Reading an existing spreadsheet, or opening one and changing a few cells. Use openpyxl for that, since it handles reading and Jetxl doesn’t.
A few hundred rows with no formatting. At that size every library is instant and the choice doesn’t matter. Reach for Jetxl when the numbers get large or the formatting gets involved.
Jetxl is experimental, and says so itself. Writing without optional parameters is well covered. Combining several formatting parameters at once is where bugs are most likely, and the shape of existing parameters may still change. Pin your version and check the output before you depend on it in production.

The shape of the API

Six functions. Choosing between them comes down to three questions: Arrow or dictionaries, one sheet or many, a file on disk or bytes in memory. Every formatting feature in this documentation is a keyword argument on write_sheet_arrow, and the same arguments work as dictionary keys when you write multiple sheets.

Which function do I call?

A short decision guide if the table above didn’t settle it.

A first file

That’s the whole thing. Everything else on this site is optional refinement.

Install it

One command, plus what to know about versions.

Quickstart

Working examples for Polars, Pandas, PyArrow and dicts.