Supported types
Types Jetxl converts for you
Three common cases would otherwise be rejected, so Jetxl normalizes them once per batch before writing.Categorical columns
Categorical columns
A pandas
Categorical, or a Polars Categorical or Enum, arrives as an Arrow Dictionary array. Jetxl decodes it to the underlying value type, usually Utf8, and writes it as text.Arrow view types
Arrow view types
Utf8View and BinaryView are cast to Utf8 and Binary. You meet these when you pass a Polars DataFrame straight in rather than calling .to_arrow().Everything already concrete
Everything already concrete
Columns that are neither dictionary-encoded nor view types pass through untouched, so PyArrow and pandas workloads pay only a cheap scan.
Unsupported types
Jetxl checks the schema once per sheet, before writing anything, and raises anOSError naming the offending column:
Values that change on the way out
Three conversions happen silently. None of them raises, so the file writes successfully and the difference only shows when you open it.Nulls become empty cells, not the text
"None", "NaN" or "null". An empty cell is not zero: Excel’s AVERAGE skips empty cells but includes zeros, so a null-heavy column averages differently depending on whether you filled the gaps before writing.Grid limits
Excel’s own ceiling is 1,048,576 rows and 16,384 columns. Jetxl checks both before writing and raises rather than producing a truncated file. For data beyond the limit, split across sheets withwrite_sheets_arrow, or reconsider whether a spreadsheet is the right format. At that size a CSV or Parquet file serves most readers better.
Dates
Date32 counts days from 1 January 1970, and Jetxl converts that to the serial number Excel expects. The cell holds a real date, not text, so Excel sorts and filters it correctly.
Excel’s date system includes a leap day, 29 February 1900, that never existed. Jetxl accounts for it, so dates before 1 March 1900 land on the right day rather than one day out. Historical data is safe.
A date still needs a format to display readably. Without one you see the underlying serial number:
date name maps to Excel’s short-date format, which renders by the reader’s locale. Pass the custom code when you need a fixed appearance.
See Number formats for the full list.