Headers
bool
default:"False"
Bolds the first row. Verified against 0.3.1: this applies bold only, with no fill, despite the source describing it as bold plus gray.
bool
default:"True"
Whether column names are written at all. Set
False when appending to a template that already has headers, or exporting data only.Freezing and filtering
int
default:"0"
Rows that stay in place while the rest scrolls.
1 pins the header.int
default:"0"
Same for columns.
1 pins the leftmost column, which helps when it holds names or IDs.bool
default:"False"
Adds filter dropdowns to the header row.
Column widths
bool
default:"False"
Sizes every column to fit its contents.
dict[str, float | str]
Per-column override keyed by column name. Accepts a number in Excel character units, a pixel string such as
"150px", or "auto".auto_width and override only the columns that need it:
Row heights
dict[int, float]
Height in points, keyed by 1-based row number.
float
Applies to every row. Excel’s own default is 15.
Header content above the data
When a report needs a title block above the table, write it withheader_content and push the DataFrame down with data_start_row.
list[tuple[int, int, str]]
Tuples of
(row, col, text) written before the data. Rows are 1-based, columns 0-based.int
default:"0"
Row where the DataFrame begins. It also excludes the rows above it from
auto_width measurement, so a long title doesn’t stretch column A.