Skip to main content
A newer version of this page is available. .
Row

WorksheetCollection.ActiveWorksheet Property

Gets or sets the currently active worksheet within a workbook.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v18.2.Core.dll

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.

// 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