Skip to main content
The primary function. Every other Arrow function accepts the same options.

Positional

Any
required
A PyArrow Table or RecordBatch, or anything exposing Arrow data, such as df.to_arrow() from Polars or Pandas. A bare Polars DataFrame also works.
str
required
Output path. Jetxl overwrites the file if it exists.

Layout

str | None
default:"None"
Tab label. Defaults to Sheet1.
bool
default:"False"
Filter dropdowns on the header row.
int
default:"0"
Rows frozen at the top.
int
default:"0"
Columns frozen at the left.
bool
default:"False"
Size columns to contents. Costs time on large frames.
bool
default:"False"
Bold the header row. Applies bold only, with no fill.
bool
default:"True"
Write column names at all.
dict[str, float | str] | None
By column name. A number, "150px", or "auto".
dict[int, float] | None
Points, keyed by 1-based row.
float | None
Applies to all rows. Excel’s default is 15.
int
default:"0"
Row where the data begins. Also excluded from auto_width measurement.
list[tuple[int, int, str]] | None
(row, col, text) written above the data. Rows 1-based, columns 0-based.

Content

dict[str, str] | None
Number format per column. See Number formats.
list[tuple[int, int, int, int]] | None
(start_row, start_col, end_row, end_col).
(row, col, url, display).
list[tuple[int, int, str, str | None]] | None
(row, col, formula, cached_value).

Styling

list[dict] | None
Per-cell font, fill, border, alignment and number format. See Cell styles.
list[dict] | None
Value-driven rules. See Conditional formatting.
list[dict] | None
Input constraints. See Data validation.

Objects

list[dict] | None
Native Excel tables. See Excel tables.
list[dict] | None
Charts. See Charts.
list[dict] | None
Embedded images. See Images.

Appearance

bool
default:"True"
Show worksheet gridlines.
int | None
Opening zoom, 10 to 400.
str | None
Sheet tab color, hex.
list[int] | None
0-based column indices to hide.
list[int] | None
Row indices to hide.
bool
default:"False"
Right-to-left sheet layout.

Returns

None. Jetxl writes the file as a side effect.

Errors

Raises OSError for an invalid number format code, an unsupported column type, or a frame exceeding Excel’s grid limits. Several other mistakes are dropped silently instead. See Conventions.
Indexing isn’t uniform across options. cell_styles and header_content use 1-based rows with 0-based columns, while image positions are 0-based on both axes. See Conventions for the full table.