WorksheetCollection

WorksheetCollection

Overview

WorksheetCollection is a class in Aspose.Cells for NET. Inherits from: IEnumerable<Worksheet>.

WorksheetCollection.Add adds a new worksheet with a default name to the workbook.

Description

WorksheetCollection is a class in the Aspose.Cells FOSS library for .NET that exposes 5 methods and 3 properties for programmatic use. It extends IEnumerable<Worksheet>, inheriting shared functionality from its parent type.

The class also provides the Count property (gets the total number of worksheets in the collection).

Properties

NameTypeAccessDescription
CountintReadGets the total number of worksheets in the collection
ActiveSheetIndexintRead/Write
ActiveSheetNamestringRead/WriteGets or sets the name of the currently active worksheet

Methods

SignatureDescription
Add()Adds a new worksheet with a default name to the workbook
Add(sheetName: string)
RemoveAt(sheetName: string)Removes the worksheet with the specified name
RemoveAt(index: int)
GetEnumerator()Returns an iterator over the worksheets in order

See Also