Dokumentacja HotXLS

Właściwość UsedRange

Zwraca obiekt IXLSRange reprezentujący używany zakres na wskazanym arkuszu. Tylko odczyt IXLSRange

Składnia

property UsedRange: IXLSRange;

Przykład

Ten przykład wyświetla zakres używanego zakresu na aktywnym arkuszu

Workbook.Sheets[1].UsedRange.Select;
This example sets the font style in used cells on the first sheet to italic

Workbook.Sheets[1].UsedRange.Font.Italic := True;
This example sets the font style for every second row in the used range to bold

With Workbook.Sheets[1].UsedRange do begin
  for i := 1 to Rows.Count do
    if (i mod 2) = 0 then Rows[i].Font.Bold := True;
end;