HotXLS Docs

Selected property

True if the Worksheet is selected. Read/write Boolean.

Syntax

property Selected: Boolean;

Example

This example selects two worksheets before saving. Pass False to Select when adding a worksheet to the current selection.

Workbook.Sheets[1].Select(True);
Workbook.Sheets[2].Select(False);

if Workbook.Sheets[2].Selected then
  Workbook.SaveAs('C:\Reports\selected-sheets.xls');

See also