HotXLS Docs

TXLSXFont class

Stores the font settings (name, size, style, color) applied through a TXLSXCellFormat brush; TXLSXFonts TXLSXFont class for HotXLS components

Syntax

TXLSXFont = class;
TXLSXFonts = class;
    

Key members

Name, SizeWideString / Double — font family and point size
Bold, Italic, StrikethroughBoolean font style flags
UnderlineTXLSXUnderline — none, single, double, or their accounting variants
Color, ColorIsAutoARGB font colour; assigning Color also clears ColorIsAuto and any theme or indexed source. ColorIsAuto = True lets Excel pick the automatic (usually black) colour
ColorTheme, ColorIndex, TintAndShadeAlternate colour sources: Office theme slot (0..11) or legacy indexed palette slot (0..63), each with an optional tint; priority is theme > indexed > RGB. Assigning a slot of 0 or more clears ColorIsAuto
VertAlignTXLSXFontVertAlign — baseline, subscript, or superscript
OutlineFont, ShadowBoolean; the Excel "Outline" and "Shadow" font effects
Family, CharSetOOXML <font> family classification and character set codes; 0 / -1 mean "not set" and are omitted from the saved file
Add, Count, ItemsTXLSXFonts pool members: append a new instance, and enumerate the pool

Example

This example makes the cells formatted through CellFormat bold, 12pt, and coloured red

CellFormat.Font.Bold := True;
CellFormat.Font.Size := 12;
CellFormat.Font.Color := $00FF0000;

See also

TXLSXWorkbook class
TXLSXWorkbook class