Column Def
class ColumnDef<T>(val header: String, val headerStyle: ExcelStyle? = null, val style: ExcelStyle? = null, val cellStyle: (T) -> ExcelStyle?? = null, val linkExtractor: (T) -> String?? = null, val valueExtractor: (T) -> Any?? = null, val formulaExtractor: (Int, T) -> String? = null)
Defines a column for the DataSheetScope.
Intentionally a plain class (not data class) because lambda fields cannot be meaningfully compared via equals()/hashCode().
Parameters
header
the column header text
header Style
optional style override for this column's header cell only
style
optional static style for data cells in this column
cell Style
optional dynamic style for data cells, evaluated per item. Has the highest priority.
link Extractor
optional lambda to extract a hyperlink URL from each item
value Extractor
lambda to extract the cell value from each item
Constructors
Link copied to clipboard
constructor(header: String, headerStyle: ExcelStyle? = null, style: ExcelStyle? = null, cellStyle: (T) -> ExcelStyle?? = null, linkExtractor: (T) -> String?? = null, valueExtractor: (T) -> Any?? = null, formulaExtractor: (Int, T) -> String? = null)