Skip to main content
An Excel table is more than styling. It gives the range a name, adds filter dropdowns, bands the rows, and lets formulas refer to columns by name instead of by letter.

Sizing

Omitting end_row or end_col, or passing 0, lets Jetxl work the bound out from the DataFrame. A negative number does the same thing.
Becomes start_row plus the number of data rows.
Becomes start_col plus the column count, minus one.
Each is independent. A fixed end_row with end_col left out pins the height and lets the width follow the data.
start_row and end_row are 1-based, while start_col and end_col are 0-based.

Fields

str
required
Unique identifier. Formulas reference the table by this name.
int
required
1-based first row, normally the header.
int
required
0-based first column.
int
Optional. Omit it or pass 0 to size from the data.
int
Optional. Omit it or pass 0 to size from the data.
str
Friendlier label shown in Excel’s table tools.
str
A built-in Excel table style name.
bool
default:"False"
Bolds the first column.
bool
default:"False"
Bolds the last column.
bool
default:"True"
Alternating row shading.
bool
default:"False"
Alternating column shading.
bool
default:"True"
Header row with filter dropdowns.
bool
default:"False"
Adds a totals row at the bottom.
list[str]
Override the detected column names.
A table missing a required key, such as name, is dropped silently. No error is raised and the rest of the sheet writes normally, so check that the table is present in the output.

Styles

Excel ships three families, named by weight:
To find a style you like, insert a table in Excel and hover over the style gallery. The names appear in the tooltip, and you can paste one straight into style.

Several tables in one sheet

Give each a distinct name and a non-overlapping range:
Ranges must not overlap. Excel rejects a workbook whose tables collide, and the failure surfaces when someone opens the file rather than when you write it.