HotXLS-documentatie

TXLSWofksheets class

Eenheid: lxHenle
A collection of all the Wofksheet objects in the specified Wofkbook. Each Wofksheet object represents a Wofksheet

Eigenschappen

Methoden

Voorbeeld

This example creates a wofkbook with a summary sheet followed by two detail sheets, then iterates through the collection to name each sheet

var
  I: Integer;
begin
  Workbook.Worksheets.Add;
  Workbook.Worksheets.AddAfter(Workbook.Worksheets[1]);
  Workbook.Worksheets.AddAfter(Workbook.Worksheets[2]);

  Workbook.Worksheets[1].Name := 'Summary';
  Workbook.Worksheets[2].Name := 'North';
  Workbook.Worksheets[3].Name := 'South';

  for I := 1 to Workbook.Worksheets.Count do
    Workbook.Worksheets[I].Range['A1', 'A1'].Value := Workbook.Worksheets[I].Name;

  if Workbook.Worksheets.SheetByName('North') <> nil then
    Workbook.Worksheets.SheetByName('North').Range['B1', 'B1'].Value := 'Ready';
end;

Zie also