Format
classin packageklyn.io.xlsx
public class Format extends Object:
└ Format

Cell format used by an XLSX workbook.

The initial API intentionally covers the formatting used by the export tests: bold text, font color and background color. Unsupported options are ignored so caller code can progressively move closer to the Python XlsxWriter option dictionaries without breaking.

@example `klyn import klyn.io.xlsx

workbook = Workbook("report.xlsx") header = workbook.addFormat({"bold": true, "font_color": "white", "bg_color": "gray"}) workbook.addWorksheet("Data").write("A1", "Name", header) workbook.close()

Properties
Modifier and Type Member Description
public readonly property backgroundColor
backgroundColor as String:
Background color as an ARGB value, or an empty string for no fill.
public readonly property bold
bold as Boolean:
Returns true when the format uses a bold font.
public readonly property fontColor
fontColor as String:
Font color as an ARGB value, or an empty string for the default color.
public readonly property styleIndex
styleIndex as Int:
Style index used in worksheet XML.
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public Format
Format(options as Map<String, Object> = null):
Creates a standalone format from an option map.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml