Holds a collection of named ranges

Implements

Constructors

Accessors

Methods

  • Parameters

    • name: string
    • scope: string
    • replaceHidden: boolean = true

    Returns void

  • Parameters

    • address: string

    Returns void

  • Add a named range. This is case insensitive; must be unique, and must not have any spaces. This will throw an error if the name is invalid or already exists,

    Parameters

    • namedRange: string | Partial<{
          comment?: string;
          hidden?: string | Partial<boolean>;
          name: string;
          ref: string | SheetCellRangeCoords[] | (string | SheetCellRangeCoords | Partial<{
              colEnd: string | number;
              colStart: string | number;
              fixedColEnd?: string | Partial<boolean>;
              fixedColStart?: string | Partial<boolean>;
              fixedRowEnd?: string | Partial<boolean>;
              fixedRowStart?: string | Partial<boolean>;
              rowEnd: string | number;
              rowStart: string | number;
              sheetName: string;
          }>)[];
          scope?: string;
          type: string;
      }>
    • replaceHidden: boolean = true

      If true will replace hidden ranges if one already exists.

    Returns NamedRangeItem

    Default Value

    true
    
  • Returns void

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

    Parameters

    • ranges: SheetCellRangeCoords[]
    • scope: string = null
    • Optional template: string
    • replaceHidden: boolean = true

    Returns string

  • Returns boolean

  • Returns void

  • Returns void

  • Updates a named range. This allows for the original name to be changed.

    Parameters

    • name: string

      The original name

    • namedRange: Partial<{
          comment?: string;
          hidden?: string | Partial<boolean>;
          name: string;
          ref: string | SheetCellRangeCoords[] | (string | SheetCellRangeCoords | Partial<{
              colEnd: string | number;
              colStart: string | number;
              fixedColEnd?: string | Partial<boolean>;
              fixedColStart?: string | Partial<boolean>;
              fixedRowEnd?: string | Partial<boolean>;
              fixedRowStart?: string | Partial<boolean>;
              rowEnd: string | number;
              rowStart: string | number;
              sheetName: string;
          }>)[];
          scope?: string;
          type: string;
      }>

    Returns NamedRangeItem

  • Validate that the NamedItem. This is identical to addNamedItem but without actually trying.

    Parameters

    • namedRangeItem: Partial<{
          comment?: string;
          hidden?: string | Partial<boolean>;
          name: string;
          ref: string | SheetCellRangeCoords[] | (string | SheetCellRangeCoords | Partial<{
              colEnd: string | number;
              colStart: string | number;
              fixedColEnd?: string | Partial<boolean>;
              fixedColStart?: string | Partial<boolean>;
              fixedRowEnd?: string | Partial<boolean>;
              fixedRowStart?: string | Partial<boolean>;
              rowEnd: string | number;
              rowStart: string | number;
              sheetName: string;
          }>)[];
          scope?: string;
          type: string;
      }>

      The range to validate

    • scope: string = null

      The scope of the range.

    • replaceHidden: boolean = true

      If true then won't check to see if the name is already used for hidden ranges.

    Returns void

    Remarks

    This will throw an error if the sheetName is invalid.

    Default Value

    true
    

    Default Value

    null