SpreadsheetControl.ActiveWorksheet Property
Gets the worksheet that is currently displayed in the SpreadsheetControl.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v19.2.dll
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/wpf-spreadsheetcontrol-api-part-1-e4938.
// Set the second worksheet ("Sheet2") as the active worksheet.
workbook.Worksheets.ActiveWorksheet = workbook.Worksheets["Sheet2"];
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.