Optional
initialState: ISheetRangeUpdate | ICellValue[][] | WorkbookJSONOptional
options: IWorkbookModelOptionsUsed for runtime reflection.
This returns any custom workbook options that are provided in constructor.
This will activate the next sheet unless there is only one. This is a convenience method for
This will activate the previous sheet unless there is only one. This is a convenience method for
Add a listener for workbook events
Add a listener for a specific range.
Optional
options: RangeListenerOptionsBy default insert/remove of headers or sheets will alter the range listener. To see the actual bounds use the range in the callback.
Adds a sheet at the given index with the given name. This will throw an exception if the sheetName is invalid or already used.
ISheetModel the newly added/created ISheetModel.
Return an array of cell ranges for the given address.
Delete the sheet.
ISheetModel, SheetRef, sheetName, or index
Will create a duplicate of the the specified sheet or the current active sheet if no sheet is specified.
Optional
key: SheetKeyReturns a single value for the found result or null if not found.
Optional
options: FindWorkbookCellOptionsLoad the state from a JSON
Return the active address as a SheetCellCoords
Return the getCell for the given address or the active cell if no address is specified.
Optional
address: SheetCellCoordsAddressThis will never return null.
Return the names of the ranges. These are sorted/filtered by type then by name.
If null then there is no protection
null
Returns all cells bounded with the specified range. These allow for interaction with the cells.
Optional
address: SheetCellRangeCoordsAddressReturns the current shared resources
Return the sheet for the given key. If no key is specified then the current active sheet is returned.
Optional
key: SheetKeyGet the sheet reference.
SheetKey
SheetRef Will return null if not available ether because it was not found or did not match the visibility
Get all of the Sheet handles within the workbook for a given SheetVisibility. By default this will only return the visible sheets
Return the current transaction store for the workbook.
Custom transaction stores must be provided via the constructor.
The view specific properties.
Begins a transaction but puts it onto a global stack. This will batch all 'transactional' changes until they have all be committed or rolled back.
Optional
description: stringAny changes that are made to this object will be reflected in the local sheet but not committed to the transactional store until the batch is popped.
Replaces all options that match.
Set the sheet to active. If this sheet was not Visible it will be made visible Fires onWorkbookSelectionChange
Set a single value. This is a convenience method that wraps setCellPairs to provide a simpler interface. For higher performance use
Optional
options: SetCellOptionsThis operation also runs synchronously.
Set the protection for the workbook.
Pass null to clear all protections.
Fires onSheetRefsChange
Fires onSheetRefsChange
Views have their own lifecycle because in a collaborative environment each user can have their own view.
Returns the current sheet style associated with this Workbook.
Serialize the workbook to a JSON.
The Base Workbook implementation