SheetXL - v0.3.20
    Preparing search index...

    Interface ISheetView

    The ISheetView provides properties and methods for controlling how a sheet is displayed and interacted with, without affecting the underlying data itself.

    View settings include aspects like frozen panes, zoom level, selection, gridlines visibility, and whether formulas are displayed. but do not affect the underlying data itself.

    • Since views only affect the presentation of the data, changes to view settings are typically not included in the undo/redo stack.
    • Multiple views can be associated to the same collection of data, each providing a different way of viewing and interacting.
    interface ISheetView {
        isISheetView: true;
        addListeners(listeners: IListeners, options?: IListener.Options): Remove;
        clear(notify?: boolean): this;
        getColumnHeaderStyle(): HeaderTextStyle;
        getFreezePanes(): FreezePanes;
        getGridLineColor(): any;
        getMovableSelection(): readonly IMovable[];
        getRangeSelection(): SelectionCoords;
        getRowHeaderStyle(): HeaderTextStyle;
        getTopLeft(): Partial<TopLeft>;
        getZoomScale(): number;
        isShowColumnGridlines(): boolean;
        isShowColumnHeaders(): boolean;
        isShowFormulas(): boolean;
        isShowRowGridlines(): boolean;
        isShowRowHeaders(): boolean;
        isShowZeros(): boolean;
        selectMovables(
            movables: readonly IMovable[],
            addToSelection?: boolean,
        ): this;
        setColumnHeaderStyle(columnHeaderStyle: HeaderTextStyle): this;
        setFreezePanes(freezePanes: FreezePanes): this;
        setGridLineColor(gridLineColor: any): this;
        setRangeSelection(selection: SelectionCoords): this;
        setRowHeaderStyle(rowHeaderStyle: HeaderTextStyle): this;
        setShowColumnGridlines(showColumnGridlines: boolean): this;
        setShowColumnHeaders(showColumnHeaders: boolean): this;
        setShowFormulas(showFormulas: boolean): this;
        setShowRowGridlines(showRowGridlines: boolean): this;
        setShowRowHeaders(showRowHeaders: boolean): this;
        setShowZeros(showZeros: boolean): this;
        setTopLeft(topLeft: Partial<TopLeft>): this;
        setZoomScale(zoomScale: number): this;
        toJSON(): ISheetView.JSON;
        unselectMovables(movables: readonly IMovable[]): this;
        update(properties: ISheetView.Properties): this;
    }

    Hierarchy (View Summary)

    Index

    Properties

    isISheetView: true

    For runtime type checking.

    Methods

    • Set the view to initial values.

      Parameters

      • Optionalnotify: boolean

      Returns this

    • Add a movable to the selection. If addToSelection is true then the items will be added to the selection.

      Parameters

      • movables: readonly IMovable[]

        The movables to select.

      • OptionaladdToSelection: boolean

      Returns this

    • Style of displaying default row header column Note - This does not affect how formulas are resolved

      Parameters

      Returns this

      HeaderTextStyle.One
      // TODO - allow a function callback (but this won't be persisted)
    • The freeze panes.

      Parameters

      Returns this

    • The color of the gridline on the sheet.

      Parameters

      • gridLineColor: any

      Returns this

      null (adopts the app theme color)
      

      GridLine color is a sheet view attribute but in Excel is a workbook attribute. If null then use the app theme.

    • The current selection for the view.

      Parameters

      Returns this

      This is generally not set directly but through the selection object.

    • Style of displaying default row header text Note - This does not affect how formulas are resolved

      Parameters

      Returns this

      HeaderTextStyle.A1
      // TODO - allow a function callback (but this won't be persisted)
    • Show/Hide column gridlines.

      Parameters

      • showColumnGridlines: boolean

      Returns this

      true;
      
    • Show/Hide columns headers.

      Parameters

      • showColumnHeaders: boolean

      Returns this

      true;
      
    • Indicate if view is showing formulas or values

      Parameters

      • showFormulas: boolean

      Returns this

      false
      
    • Show/Hide row gridlines.

      Parameters

      • showRowGridlines: boolean

      Returns this

      true;
      
    • Show/Hide row headers.

      Parameters

      • showRowHeaders: boolean

      Returns this

      true;
      
    • Indicate whether the sheet should show 0 (zero) or blanks in cells containing zero values.

      Parameters

      • showZeros: boolean

      Returns this

      true
      

      When false, cells with zero value appear blank instead of showing the number zero.

    • The default top left corner accounting for scrolling.

      Parameters

      Returns this

    • Zoom. This is expressed as a percentage. Values can be between 10 (10%) or 400 (400%).

      Parameters

      • zoomScale: number

      Returns this

      100
      // TODO - support zoomScaleNormal, zoomScalePageLayout, zoomScaleSheetLayoutView,