OSError, not ValueError. Catch OSError when you need to handle a failed write.The file won’t open
Excel says the workbook needs repairing
Excel says the workbook needs repairing
Nothing was written at all
Nothing was written at all
A feature didn’t appear
This is the most common class of problem, because several mistakes are dropped silently rather than raised.A conditional format is missing entirely
A conditional format is missing entirely
rule_type causes the whole rule to be dropped, with no error. Check the spelling against cell_value, color_scale, data_bar and top10.A table is missing
A table is missing
name, is dropped the same way.A color didn't apply
A color didn't apply
"red" and three-digit shorthand such as "F00" are both dropped. Use six or eight hex digits. See Conventions.A conditional format highlights the wrong cells
A conditional format highlights the wrong cells
operator. An unrecognized value silently becomes greater_than, so greater_then gives you a working file with the wrong rule.Something looks wrong
Percentages are 100x too big
Percentages are 100x too big
0.15 for 15 percent rather than 15.A style landed one row off
A style landed one row off
cell_styles, header_content and table ranges use 1-based rows with 0-based columns, while chart and image positions are 0-based on both axes.Some numbers came out blank
Some numbers came out blank
NaN and infinity are written as empty cells, because neither is valid in the spreadsheet format. Fill them before writing if they carry meaning.Text lost characters
Text lost characters
Dates show as numbers
Dates show as numbers
column_formats to "date" or "datetime" for that column.Headers aren't shaded
Headers aren't shaded
styled_headers applies bold only. There’s no fill. Use cell_styles on the header row if you want a background color.The write failed on a very large frame
The write failed on a very large frame
It’s slower than expected
auto_width on a large frame
auto_width on a large frame
auto_width measures every row. On large exports set explicit column_widths instead. The project’s own guidance is to disable auto-width for speed.Using the dictionary functions
Using the dictionary functions
write_sheet reads Python lists rather than Arrow buffers and benchmarks at roughly twice the time. Switch to write_sheet_arrow.More threads than sheets
More threads than sheets
min(os.cpu_count(), len(sheets)).