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

Referring to Columns

Use the Columns property to work with columns. This property return a Range object that represents columns of range.

Example

In the following example, Columns[1] returns column one of used range on Sheet1.
Workbook.Sheets[1].UsedRange.Columns[1].Font.Bold := true;
The following example clears contents of column three in the range B5:F19.
Workbook.Sheets[1].Range['B5','F19'].Columns[3].ClearContents;
The following example merges the first column of range B2:C5.
Workbook.Sheets[1].RCRange[2, 2, 5, 3].Columns[1].Merge(False);
Copyright©2014 loslab.com