WorksheetCollection
Overview
WorksheetCollection is a class in Aspose.Cells FOSS for C++.
Encapsulates the workbook’s worksheets and active-sheet state.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
WorksheetCollection | WorksheetCollection | Read |
Methods
| Signature | Description |
|---|---|
WorksheetCollection() → WorksheetCollection | Initializes a new instance of the WorksheetCollection class. The parent workbook. The underlying workbook model. |
GetCount() → int | Gets the total number of worksheets in the workbook. |
GetActiveSheetIndex() → int | Gets or sets the zero-based index of the active worksheet. |
SetActiveSheetIndex(value: int) | |
GetActiveSheetName() → std::string | Gets or sets the name of the active worksheet. |
SetActiveSheetName(value: std::string_view) | |
Add() → int | Adds a worksheet using the next generated default name. The zero-based index of the added worksheet. |
Add(sheetName: std::string_view) → int | Adds a worksheet using the next generated default name. The zero-based index of the added worksheet. |
RemoveAt(index: int) | Removes the worksheet at the specified zero-based index. The zero-based index of the worksheet to remove. |
RemoveAt(sheetName: std::string_view) | Removes the worksheet at the specified zero-based index. The zero-based index of the worksheet to remove. |
begin() → std::vector<std::unique_ptr<Worksheet>>::const_iterator | Returns an iterator to the beginning of the worksheet collection. |
end() → std::vector<std::unique_ptr<Worksheet>>::const_iterator | Returns an iterator to the end of the worksheet collection. |