WorksheetCollection.ActiveWorksheet Property
Gets or sets the currently active worksheet within a workbook.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Property Value
Type | Description |
---|---|
Worksheet | A Worksheet object that specifies the active worksheet. |
Example
To set an active worksheet within a workbook, assign the corresponding Worksheet object to the WorksheetCollection.ActiveWorksheet
property.
// Set the second worksheet under the "Sheet2" name as active.
workbook.Worksheets.ActiveWorksheet = workbook.Worksheets["Sheet2"];
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ActiveWorksheet property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.