A collection of NamedReference instances in a workbook.

See

Hierarchy

Hierarchy

  • Base
    • NamedReferenceCollection

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get count(): number
  • Gets the number of named references in the collection. The number of named references in the collection.

    Returns number

  • get workbook(): Workbook
  • Gets the workbook associated with this collection. The workbook associated with this collection.

    Returns Workbook

Methods

  • Adds a named reference with a scope of the collection's associated workbook to the collection.

    The CellReferenceMode of the owning workbook will be used to parse the formula.

    Throws

    ArgumentNullException 'name' is null or empty.

    Throws

    ArgumentException 'name' is longer than 255 characters.

    Throws

    ArgumentException 'name' is invalid. The name must begin with a letter, underscore (), or a backslash (). All other characters in the name must be letters, numbers, periods, underscores (), or backslashes (). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers).

    Throws

    InvalidOperationException 'name' is used by another named reference which also has a scope of the workbook. Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'formula' is null or empty.

    Throws

    ArgumentException 'formula' is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.

    Returns

    The named reference which was added to the collection.

    See

    NamedReferenceBase.scope

    Parameters

    • name: string

      The name to give the named reference.

    • formula: string

      The formula to give the named reference.

    Returns NamedReference

  • Adds a named reference with a scope of the collection's associated workbook to the collection.

    Throws

    ArgumentNullException 'name' is null or empty.

    Throws

    ArgumentException 'name' is longer than 255 characters.

    Throws

    ArgumentException 'name' is invalid. The name must begin with a letter, underscore (), or a backslash (). All other characters in the name must be letters, numbers, periods, underscores (), or backslashes (). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers).

    Throws

    InvalidOperationException 'name' is used by another named reference which also has a scope of the workbook. Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'formula' is null or empty.

    Throws

    ArgumentException 'formula' is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.

    Throws

    InvalidEnumArgumentException 'cellReferenceMode' is not defined in the CellReferenceMode enumeration.

    Returns

    The named reference which was added to the collection.

    See

    NamedReferenceBase.scope

    Parameters

    • name: string

      The name to give the named reference.

    • formula: string

      The formula to give the named reference.

    • cellReferenceMode: CellReferenceMode

      The mode used to interpret cell references in the formula.

    Returns NamedReference

  • Adds a named reference with a scope of a worksheet to the collection.

    Throws

    ArgumentNullException 'name' is null or empty.

    Throws

    ArgumentException 'name' is longer than 255 characters.

    Throws

    ArgumentException 'name' is invalid. The name must begin with a letter, underscore (), or a backslash (). All other characters in the name must be letters, numbers, periods, underscores (), or backslashes (). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers).

    Throws

    InvalidOperationException 'name' is used by another named reference which also has a scope of the specified 'worksheet'. Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'formula' is null or empty.

    Throws

    ArgumentException 'formula' is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.

    Throws

    InvalidEnumArgumentException 'cellReferenceMode' is not defined in the CellReferenceMode enumeration.

    Throws

    ArgumentNullException 'worksheet' is null.

    Throws

    ArgumentException 'worksheet' does not belong to the workbook owning this collection.

    Returns

    The named reference which was added to the collection.

    See

    NamedReferenceBase.scope

    Parameters

    • name: string

      The name to give the named reference.

    • formula: string

      The formula to give the named reference.

    • cellReferenceMode: CellReferenceMode

      The mode used to interpret cell references in the formula.

    • worksheet: Worksheet

      The scope of the named reference.

    Returns NamedReference

  • Adds a named reference with a scope of a worksheet to the collection.

    The CellReferenceMode of the owning workbook will be used to parse the formula.

    Throws

    ArgumentNullException 'name' is null or empty.

    Throws

    ArgumentException 'name' is longer than 255 characters.

    Throws

    ArgumentException 'name' is invalid. The name must begin with a letter, underscore (), or a backslash (). All other characters in the name must be letters, numbers, periods, underscores (), or backslashes (). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers).

    Throws

    InvalidOperationException 'name' is used by another named reference which also has a scope of the specified 'worksheet'. Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'formula' is null or empty.

    Throws

    ArgumentException 'formula' is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.

    Throws

    ArgumentNullException 'worksheet' is null.

    Throws

    ArgumentException 'worksheet' does not belong to the workbook owning this collection.

    Returns

    The named reference which was added to the collection.

    See

    NamedReferenceBase.scope

    Parameters

    • name: string

      The name to give the named reference.

    • formula: string

      The formula to give the named reference.

    • worksheet: Worksheet

      The scope of the named reference.

    Returns NamedReference

  • Clears all named references from the collection.

    Returns void

  • Determines whether a named reference is in the collection.

    Returns

    True if the named reference is found; False otherwise.

    Parameters

    • namedReference: NamedReference

      The named reference to locate in the collection.

    Returns boolean

  • Parameters

    • other: any

    Returns boolean

  • Finds a named reference in the collection with a scope of the collection's associated Workbook.

    Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'name' is null or empty.

    Returns

    The named reference with the specified name or null if the named reference was not found.

    Parameters

    • name: string

      The name of the named reference to find.

    Returns NamedReference

  • Finds a named reference in the collection with a scope of the specified worksheet.

    Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'name' is null or empty.

    Throws

    ArgumentNullException 'worksheetScope' is null.

    Returns

    The named reference with the specified name or null if the named reference was not found.

    Parameters

    • name: string

      The name of the named reference to find.

    • worksheetScope: Worksheet

      The worksheet that the named reference found must have a scope of.

    Returns NamedReference

  • Finds all named references in the collection with the specified name.

    Named reference names are compared case-insensitively.

    Throws

    ArgumentNullException 'name' is null or empty.

    Returns

    An array of NamedReference instances with the specified name.

    Parameters

    • name: string

      The name of the named references to find.

    Returns NamedReference[]

  • Returns number

  • Gets the named reference at the specified index. The named reference at the specified index.

    Throws

    ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • a: number

    Returns NamedReference

  • Removes the named reference at the specified index in the collection.

    Throws

    ArgumentOutOfRangeException 'index' is less than zero or 'index' is greater than or equal to count.

    Parameters

    • index: number

      The zero-based index of the named reference in the collection.

    Returns void

  • Removes the specified named reference from the collection.

    Returns

    True if the named reference existed in the collection and was removed; False otherwise.

    Parameters

    • namedReference: NamedReference

      The named reference to remove fro the collection.

    Returns boolean

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Returns void