SheetXL - v0.3.20
    Preparing search index...

    Class Workbook

    The Base implementation of IWorkbook.

    Implements

    Index

    Constructors

    Accessors

    • get "[toStringTag]"(): string

      Returns string

    • get isIWorkbook(): true

      For runtime type checking.

      Returns true

    Methods

    • Batches all 'transactional' changes until they have all be committed or rolled back.

      Parameters

      • Optionaloptions: string | OperationOptions

        Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.

      Returns ITransaction

      Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.

      Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.

    • Close the workbook and release any resources.

      Returns void

      No further operations are allowed after a close.

    • Provides a mechanism to perform a set of operations in a batch.

      Type Parameters

      • R

      Parameters

      • callback: (commit: ICommit) => R | Promise<R>

        A callback that performs multiple operations all within the same transaction.

      • Optionaloptions: string | OperationOptions

        Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.

      Returns R | Promise<R>

    • Given the name return a valid name that closely matches.

      Parameters

      • str: string

        The string to validate.

      Returns string

    • Returns the next sheet in the sheets collection. If the last one it will return the first.

      Parameters

      • index: number

      Returns ISheet

      If there is only 1 sheet this will return the current sheet.

    • Returns the previous sheet in the sheets collection. If the first one it will return the last.

      Parameters

      • index: number

      Returns ISheet

      If there is only 1 sheet this will return the current sheet.

    • Returns ranges scoped to a sheet.

      Parameters

      Returns ICellRange

      When accessing ranges from the IWorkbook ranges include a sheet name. This enables cross-sheet references when working at the workbook level.

      Some examples of cross-sheet reference are:

      • Linking data and formulas across multiple sheets.

      • Consolidating data from different sheets for analysis or reporting.

      • Performing calculations or comparisons that involve values from multiple sheets.

    • Returns the currently active sheet index within the workbook.

      Returns number

    • Returns the sheet for the given name.

      Parameters

      • name: string

        The name of the sheet.

      • visibility: Visibility = ISheet.Visibility.Visible

        The visibility of the sheet.

      Returns ISheet

    • Returns the sheet at the given offset.

      Parameters

      • index: number

        A 0-based index of the sheet.

      • visibility: Visibility = ISheet.Visibility.Visible

        The visibility of the sheet.

      Returns ISheet

    • Returns the current shared resources.

      Returns IStore

    • Returns the current view settings.

      View settings determine how specific workbook level elements are displayed but does not affect the underlying data itself.

      Returns IWorkbookView

    • Indicates if the model has been closed.

      Returns boolean

    • Is date resolution 1904 instead of 1900 based.

      Returns boolean

    • Indicate if the current character is a valid character for a sheetName.

      Parameters

      • character: string

        The string to validate.

      Returns boolean

    • Determine if dates should be 1904 instead of 1900 based.

      Parameters

      • date1904: boolean

        default value false

      Returns this

    • Set the current theme.

      Parameters

      Returns ITheme

      • If null sets back to the default theme.
      • Does not fire a theme updated event.
    • Views have their own lifecycle because in a collaborative environment each user can have their own view.

      Parameters

      Returns this

    • Serialize the workbook to a JSON.

      Parameters

      • excludeData: boolean = false

        If true only meta data about the workbook will be saved.

      Returns Promise<JSON>

    • Returns a string representation of an object.

      Returns string