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

Worksheets property

Returns a Worksheets collection that represents all the sheets in the specified Workbook. Read-only Worksheets object.


property Worksheets: IXLSWorksheets;


This example creates a new Worksheet and then places a list of the active Workbook's sheet names in the first column.

Sheet := Workbook.Add;
for i := 1 to Workbook.Worksheets.Count do
   Sheet.Cells.Item[i, 1].Value := Workbook.Worksheets[i].Name;