vcl-dxspreadsheetcore-dot-tdxcustomspreadsheet.md
Provides access to a generic worksheet object corresponding to the currently active sheet.
property ActiveSheet: TdxSpreadSheetCustomView read; write;
| Type |
|---|
| TdxSpreadSheetCustomView |
You can use this property to:
Obtain a generic worksheet object corresponding to the active sheet within a workbook. Since a generic worksheet object does not correspond to any of the actual worksheet types, you need to cast it to the respective type to access the type-specific properties and methods;
Activate another sheet within a workbook by assigning its corresponding TdxSpreadSheetCustomView object.
dxSpreadSheet1.ActiveSheet := dxSpreadSheet1.Sheets[2];
dxSpreadSheet1->ActiveSheet = dxSpreadSheet1->Sheets[2];
In this example, the Sheets property, which provides zero-based indexed access to all generic sheet objects within a workbook, is used as a source of the target worksheet object.
Note
A newly created worksheet becomes active immediately.
To access the currently active Table View worksheet, use its ActiveSheetAsTable property, added as an alternative to the type casting operation.
See Also