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

Referring to Ranges by using Index numbers

You can use the RCRange property to refer to a range of cells by using row and column index numbers.

Example

The following example changes the format of cells A1:D5 to bold.
Workbook.Sheets[1].RCRange[1, 1, 5, 4].Font.Bold := true;
The following example changes the value of cell B3 to 100.
Workbook.Sheets[1].RCRange[3, 2, 3, 2].Value := 100;
The following example merges the cells B2:C5.
Workbook.Sheets[1].RCRange[2, 2, 5, 3].Merge(False);
Copyright©2007-2019 loslab.com