Class: Workbook

Core.SpreadsheetEditor. Workbook

Represents a Workbook in the spreadsheet editor that encapsulates a collection of sheets along with operations to manipulate them.

new Workbook()

Properties:
Name Type Description
activeSheetIndex number Gets the current active sheet index.
sheetCount number Gets the number of sheets currently in the Workbook.

Methods


getSheetAt(index)

Retrieves a sheet from the Workbook by its index. Provides access to a sheet based on its position within the Workbook.
Parameters:
Name Type Description
index number A zero-based index of the sheet to retrieve. The index reflects the sheet's position in the Workbook, starting from 0 for the first sheet.
Returns:
The Sheet object located at the specified index within the Workbook. If the index is out of bounds, either negative or exceeding the last index of the Workbook's sheets, an exception will be thrown.
Type
Sheet

setActiveSheet(activeSheetIndex)

Sets the specified sheet as the active sheet in a spreadsheet.
Parameters:
Name Type Description
activeSheetIndex number Sets the active sheet by its zero-based index, where the first sheet is 0, the second is 1, and subsequent sheets follow in sequence.