WorkbookWorksheets
classin packageklyn.io.xlsx
public class WorkbookWorksheets extends Object implements IList<Worksheet>
└ 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
propertyInherited Properties from Object: type
propertyInherited Properties from IList: size
Constructors
Modifier and Type Member Description
public 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 Long = 0) as Long
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 Long = -1) as Long
Returns the last index containing the worksheet reference.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml
methodInherited 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 Long) as Worksheet Returns a worksheet by zero-based index.
Inherited Operators
operatorInherited Operators from IList: operator in(item as T) as Boolean, operator[](index as Long) as T