HotXLS Docs

IXLSInterior Interface

Unit: lxHandle
Represents the interior of range of cells.

Properties

Methods

SetThemeColor method — assign the cell fill (foreground) colour to one of the 12 Office theme colour slots with an optional tint (since v2.61.0).
SetPatternThemeColor method — assign the cell pattern (background) colour to one of the 12 Office theme colour slots with an optional tint (since v2.61.0).

Example

This example applies a solid fill to the header row and uses a pattern fill for cells that need attention.

var
  Header: IXLSRange;
  WarningCells: IXLSRange;
begin
  Header := Workbook.Sheets[1].Range['A1', 'G1'];
  Header.Interior.Color := $00D9EAD3;
  Header.Interior.Pattern := xlPatternSolid;

  WarningCells := Workbook.Sheets[1].Range['G2', 'G20'];
  WarningCells.Interior.Pattern := xlPatternGray25;
  WarningCells.Interior.PatternColor := $000000FF;
end;

See also