Interface ICellRange

Interface for interacting with a bounded ranges of cells.

interface ICellRange {
    bounds(): CellRangeCoords;
    cell(options?): ICellModel;
    cells(options?): ICellModel[][];
    forEach(visitor, options?): void;
    isValid(): boolean;
    toString(): string;
    value(options?): ICellValue;
    values(options?): ICellValue[][];
}

Hierarchy (view full)

Methods

  • Convenience that returns the first cell

    Parameters

    • Optional options: {
          includeHidden?: boolean;
      }
      • Optional includeHidden?: boolean

    Returns ICellModel

  • A 2d list of ICellModels as convenience. This calls forEach and builds a 2d array .

    Parameters

    • Optional options: {
          includeHidden?: boolean;
      }
      • Optional includeHidden?: boolean

    Returns ICellModel[][]

    Include Hidden

    Default Value

    true
    
  • Advanced and performant way to iteratively values. This allows for visiting only values that are not empty.

    Parameters

    Returns void

    Remarks

    • Visitors can return a 'break' value to stop the visit.
    • skipEmpty will ensure that only non-empty cells are visited.
    • getContext().getCell() requires additional work over getCoord or reading value.
  • If the range is valid. A range can be invalid if removed, has incorrect, or even an incorrect format.

    Returns boolean

  • Returns the address as a string

    Returns string

  • Convenience that returns the first cell

    Parameters

    • Optional options: {
          datesAsJSDate?: boolean;
          includeHidden?: boolean;
      }
      • Optional datesAsJSDate?: boolean
      • Optional includeHidden?: boolean

    Returns ICellValue

  • A 2d list of values as convenience. This calls forEach and builds a 2d array.

    Parameters

    • Optional options: {
          datesAsJSDate?: boolean;
          includeHidden?: boolean;
      }
      • Optional datesAsJSDate?: boolean
      • Optional includeHidden?: boolean

    Returns ICellValue[][]

    Remarks

    This guarantees that the a 2D value with a least 1 value will always be returned. The value may be null.

    Include Hidden

    Default Value

    true
    By default values dates are returns as JSDates

    Dates As JSDate

    Default Value

    true