The Excel export API now accepts a data format string on any cell style, covering both built-in Excel format codes and custom pattern strings. Previously, exported cells used default type-based formatting; with this addition, a report can specify #,##0.00 for financial figures, DD/MM/YYYY for date columns, or any Excel-compatible custom pattern, and the format is embedded in the workbook file rather than applied after download.
Format string support
- Built-in format codes. Excel's built-in numeric and date format indices — General, integer, decimal, date, time, currency — are available by code number, so standard formats do not require a custom pattern string.
- Custom pattern strings. Any Excel-compatible format pattern — custom number groupings, conditional formatting prefixes, multi-section patterns — can be set on a cell style directly.
- Per-cell granularity. Format strings are applied at the cell style level, so different columns or rows in the same sheet can carry distinct formats without defining separate style objects for each data type.
This is primarily relevant for financial and operational reports where the display format of numeric and date values must match a document standard — balance sheets, invoice exports, payroll summaries — without requiring the recipient to reformat the file after download.