HotXLS Docs

ColorIndex property

Returns or sets the colour of the interior. The colour is specified as an index value into the current colour palette, or as one of the XlColorIndex constants. Read/write LongWord.

Syntax

property ColorIndex: LongWord;

Description

ColorIndex can be one of these XlColorIndex constants.
xlColorIndexAutomatic Use to specify the automatic fill
xlColorIndexNone Use to specify no interior fill
The following illustration shows the colour-index values in the default colour palette.

Example

This example sets the colour of the range A1:C10 interior to red.

Workbook.Worksheets[1].Range['A1', 'C10'].Interior.ColorIndex := 3;