HotXLS Delphi Excel Read Write Library / Component Developers Guide loslab Inc.

ColorIndex property

Returns or sets the color of the font. The color is specified as an index value into the current color palette, or as the following XlColorIndex constant: xlColorIndexAutomatic. Read/write LongWord.

Syntax

property ColorIndex: LongWord;

Example

This example changes the font color in cell A1 on sheet one to red.

Workbook.Worksheets[1].Range['A1', 'A1'].Font.ColorIndex := 3;
Copyright©2007-2019 loslab.com