Skip to main content
Every Jetxl function writes a spreadsheet. Which one you want falls out of three independent questions.

1. Arrow or dictionaries?

Arrow — use this

Functions ending in _arrow. They read DataFrame memory directly and support every formatting feature. You need Polars, Pandas or PyArrow.

Dictionaries — legacy

write_sheet and write_sheets. A plain dict of column name to list, with no DataFrame dependency, but slower and charts are the only extra supported.
The dictionary functions exist for backward compatibility. Prefer Arrow unless you specifically want no DataFrame dependency.

2. One sheet or many?

Singular writes one sheet. Plural takes a list of sheet dictionaries and generates their XML in parallel.
num_threads is a required positional argument on write_sheets_arrow and write_sheets. It has no default, and omitting it raises a TypeError. On the bytes variant it defaults to 1.

3. A file or bytes?

write_sheet_arrow(data, "report.xlsx", ...) takes a filename, returns nothing, and leaves the file where you asked for it.
write_sheet_arrow_to_bytes(data, ...) takes no filename and returns bytes. Use it for HTTP responses, cloud functions, and object storage uploads, anywhere a temporary file would be a nuisance. See In-memory output.

The full grid

The four Arrow functions accept the same formatting arguments. Learn them once on write_sheet_arrow and they carry across.