HotXLS 文件

Rows 屬性

傳回代表指定範圍中列的 IXLSRowsRange 介面至 TXLSRange 物件。唯讀 IXLSRowsRange

語法

property Rows: IXLSRowsRange;

範例

此範例顯示工作表一選取範圍中的列數

With Workbook.Sheets[1].Range['A1', 'F10'] do begin
  Rows[2].Font.Bold := True;
end;
This example copies the values from the second row of range A1:F10 to third

With Workbook.Sheets[1].Range['A1', 'F10'] do begin
  Rows[3].Value := Rows[2].Value;
end;
This example displays the number of rows in the selection on sheet one

MessageDlg('The selection contains ' +
           inttostr(Workbook.Worksheets[1].Selection.Rows.Count) + ' rows.',
           mtInformation, [mbOk], 0);