Interface IWorkbookView

View settings for a single workbook.

interface IWorkbookView {
    activeSheetId: number;
    addListener: ((listener) => RemoveListener);
    showFormulaBar: boolean;
    showHorizontalScrollbar: boolean;
    showStatusBar: boolean;
    showTabs: boolean;
    showVerticalScrollbar: boolean;
    tabRatio: number;
    fromJSON(json, notify?): void;
    toJSON(): Partial<{
        activeSheetId: string | number;
        addListener: string | ((listener) => RemoveListener) | Partial<{}>;
        showFormulaBar: string | Partial<boolean>;
        showHorizontalScrollbar: string | Partial<boolean>;
        showStatusBar: string | Partial<boolean>;
        showTabs: string | Partial<boolean>;
        showVerticalScrollbar: string | Partial<boolean>;
        tabRatio: string | number;
        fromJSON: any;
        toJSON: any;
    }>;
}

Hierarchy (view full)

Properties

activeSheetId: number

The id of of the activeSheet.

Remarks

This is NOT the index of the sheet but instead the id (1 based) If the sheets have been reordered then these won't match.

addListener: ((listener) => RemoveListener)

Add a listener for workbook view events

Type declaration

showFormulaBar: boolean

Shows the formula bar

Default Value

true;
showHorizontalScrollbar: boolean

show the horizontal scrollbar.

Default Value

true;
showStatusBar: boolean

Show the status bar

Default Value

true
showTabs: boolean

Shows the workbook tabs

Default Value

true;
showVerticalScrollbar: boolean

show the vertical scrollbar.

Default Value

true;
tabRatio: number

Specifies ratio between the workbook tabs and the horizontal scroll bar.

Remarks

This is expressed as a percent * 1000.

Default Value

600;

Methods

  • Load internal state from json

    Parameters

    • json: Partial<{
          activeSheetId: string | number;
          addListener: string | ((listener) => RemoveListener) | Partial<{}>;
          showFormulaBar: string | Partial<boolean>;
          showHorizontalScrollbar: string | Partial<boolean>;
          showStatusBar: string | Partial<boolean>;
          showTabs: string | Partial<boolean>;
          showVerticalScrollbar: string | Partial<boolean>;
          tabRatio: string | number;
          fromJSON: any;
          toJSON: any;
      }>
    • Optional notify: boolean

    Returns void

  • Save internal state to JSON

    Returns Partial<{
        activeSheetId: string | number;
        addListener: string | ((listener) => RemoveListener) | Partial<{}>;
        showFormulaBar: string | Partial<boolean>;
        showHorizontalScrollbar: string | Partial<boolean>;
        showStatusBar: string | Partial<boolean>;
        showTabs: string | Partial<boolean>;
        showVerticalScrollbar: string | Partial<boolean>;
        tabRatio: string | number;
        fromJSON: any;
        toJSON: any;
    }>