HotXLS Docs

TXLSXAlignment class

Stores the cell alignment settings (horizontal/vertical position, wrapping, indent, rotation) applied through a TXLSXCellFormat brush; TXLSXAlignments TXLSXAlignment class for HotXLS components

Syntax

TXLSXAlignment = class;
TXLSXAlignments = class;
    

Key members

Horizontal, VerticalTXLSXHorizontalAlignment / TXLSXVerticalAlignment — cell content alignment
WrapText, ShrinkToFitBoolean; wrap long text onto multiple lines, or shrink the font to fit the column width
IndentInteger, typically 0..15 — indent level shown in the Excel Alignment dialog
TextRotationInteger, -90..90 degrees
QuotePrefixBoolean; marks the cell's stored text as a literal (Excel's leading-apostrophe behaviour) — written on the cell's <xf>, not the <alignment> element
IsDefaultReturns True when every member is still at its default value
Add, Count, ItemsTXLSXAlignments pool members: append a new instance, and enumerate the pool

Example

This example wraps text and centres it in the cells formatted through CellFormat

CellFormat.Alignment.Horizontal := xlsxXAlignCenter;
CellFormat.Alignment.WrapText := True;

See also

TXLSXWorkbook class
TXLSXWorkbook class