Skip to main content
Row

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

Worksheet ActiveWorksheet { get; set; }

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.

View Example

// Set the second worksheet under the "Sheet2" name as active.
workbook.Worksheets.ActiveWorksheet = workbook.Worksheets["Sheet2"];

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.

See Also