Skip to main content
The mapping is mostly mechanical. Jetxl has no reader, so if your script also opens or edits workbooks, keep your existing library for that half and use Jetxl only for writing.

From openpyxl

openpyxl builds a workbook cell by cell. Jetxl takes the whole frame plus a description of how it should look.

From XlsxWriter

XlsxWriter is closer in spirit, since it’s also write-only. The main difference is that it defines format objects up front and applies them per write, while Jetxl takes plain dictionaries.

From polars.write_excel

The closest starting point, since you already have a DataFrame.
The published benchmark puts polars.write_excel at 26.6s against 0.66s for Jetxl on a million rows, with 3.13 GB peak memory against 958 MB. See Performance.

What to check after switching

openpyxl and XlsxWriter are each internally consistent about row bases. Jetxl isn’t: rows are 1-based for cell styles, header content and table ranges, and 0-based for chart and image positions. See Conventions.
If you were writing percentages as whole numbers with a plain format, the built-in percentage formats multiply them by 100. Store decimals instead.
XlsxWriter accepts named colors such as red. Jetxl doesn’t, and drops them silently rather than raising. Convert to hex.
styled_headers gives bold only, with no fill. If your openpyxl or XlsxWriter output had shaded headers, reproduce that with cell_styles on the header row.
Any part of your code that opens an existing workbook has to stay on openpyxl. Jetxl only writes.