WorkbookWorksheets
class in package klyn.io.xlsx

    public class WorkbookWorksheets extends Object implements IList<Worksheet>:

Object
└ WorkbookWorksheets
All Implemented Interfaces: IList

Workbook worksheet collection.

The collection preserves worksheet order and also exposes name-based lookup, which keeps code close to common spreadsheet APIs.

Example

    import klyn.io.xlsx

    workbook = Workbook("report.xlsx", WorkbookMode.CREATE)
    sheet = workbook.addWorksheet("Data")
    assert workbook.worksheets["Data"] == sheet
    workbook.close()

Properties

Modifier and Type | Member | Description
--- | --- | ---
public override readonly property | size `size as ULong:` | Number of worksheets.

Inherited Properties
property Inherited Properties from Object: type
property Inherited Properties from IList: size
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | WorkbookWorksheets `WorkbookWorksheets():` | Creates an empty worksheet collection.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | count `count(item as Worksheet) as ULong:` | Counts worksheet references equal to `item`.
public override | indexOf `indexOf(item as Worksheet, start as Int = 0) as Int:` | Returns the first index containing the worksheet reference.
public override | join `join(separator as String) as String:` | Joins worksheet names.
public override | lastIndexOf `lastIndexOf(item as Worksheet, start as Int = -1) as Int:` | Returns the last index containing the worksheet reference.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
method Inherited Methods from IList: count, indexOf, join, lastIndexOf
Operators

Modifier and Type | Member | Description
--- | --- | ---
public override | operator in(item as Worksheet) as Boolean: | Returns true when a worksheet reference exists in this collection.
public | operator[](name as String) as Worksheet: | Returns a worksheet by name.
public override | operator[](index as Int) as Worksheet: | Returns a worksheet by zero-based index.

Inherited Operators
operator Inherited Operators from IList: operator in(item as T) as Boolean, operator[](index as Int) as T