Represents a hyperlink for a cell or region.

See

  • [[Worksheet.hyperlinks]]
  • [[WorksheetCell.getHyperlink]]
  • [[WorksheetRow.getCellHyperlink]]

Hierarchy

Hierarchy

  • Base
    • WorksheetHyperlink

Implements

  • IChangeInfoContext

Constructors

  • Parameters

    • sourceAddress: string
    • target: any
    • Optional displayText: string
    • Optional toolTip: string

    Returns WorksheetHyperlink

  • Parameters

    • sourceCell: WorksheetCell
    • target: any
    • Optional displayText: string
    • Optional toolTip: string

    Returns WorksheetHyperlink

  • Parameters

    • sourceRegion: WorksheetRegion
    • target: any
    • Optional displayText: string
    • Optional toolTip: string

    Returns WorksheetHyperlink

  • Parameters

    • sourceCell: WorksheetCell
    • target: string
    • displayText: string
    • isSealed: boolean

    Returns WorksheetHyperlink

  • Parameters

    • Rest ..._rest: any[]

    Returns WorksheetHyperlink

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get displayText(): string
  • Gets or sets the text to display in the cell when the hyperlink is added to a worksheet, or null to use the target text.

    Note: the display text will only get applied if the target cell has no value or a string value.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the specified value is longer than 2084 characters.

    Returns string

  • set displayText(a): void
  • Parameters

    • a: string

    Returns void

  • get isSealed(): boolean
  • Gets the value indicating whether the hyperlink is sealed and cannot be modified.

    Returns boolean

  • get sourceAddress(): string
  • Gets or sets the address of the cell or region on which the hyperlink resides.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentNullException]] Occurs when the value assigned is null.

    Throws

    [[ArgumentException]] Occurs when the value assigned cannot be parsed as a cell or region address in the owning workbook's current cell reference mode.

    See

    • [[sourceCell]]
    • [[sourceRegion]]

    Returns string

  • set sourceAddress(a): void
  • Parameters

    • a: string

    Returns void

  • get sourceCell(): WorksheetCell
  • Gets or sets the cell on which the hyperlink resides.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentNullException]] Occurs when the value assigned is null.

    Throws

    [[ArgumentException]] Occurs when the value assigned is not on the same worksheet as the hyperlink.

    See

    • [[sourceAddress]]
    • [[sourceRegion]]

    Returns WorksheetCell

  • set sourceCell(a): void
  • Parameters

    Returns void

  • get sourceRegion(): WorksheetRegion
  • Gets or sets the region on which the hyperlink resides.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentNullException]] Occurs when the value assigned is null.

    Throws

    [[ArgumentException]] Occurs when the value assigned is not on the same worksheet as the hyperlink.

    See

    • [[sourceCell]]
    • [[sourceRegion]]

    Returns WorksheetRegion

  • set sourceRegion(a): void
  • Parameters

    Returns void

  • get target(): any
  • Gets or sets the target of the hyperlink, which can be a string, [[WorksheetCell]], [[WorksheetRegion]], or [[NamedReference]] instance. For bookmarks in an external document, separate the sub-address with a #, such as "File.xlsx#Sheet1!C3". For email addresses, use a target string with the format "mailto:joe@company.com" or "mailto:joe@company.com?subject=Email%20Subject".

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the value assigned is not a string, WorksheetCell, WorksheetRegion, or NamedReference instance.

    Throws

    [[ArgumentException]] Occurs when the specified value is a string longer than 256 characters.

    Throws

    [[ArgumentException]] Occurs when the value assigned is a cell or region which is not from the same workbook as the owning workbook of the hyperlink.

    See

    • [[targetAddress]]
    • [[targetCell]]
    • [[targetRegion]]
    • [[targetNamedReference]]

    Returns any

  • set target(a): void
  • Parameters

    • a: any

    Returns void

  • get targetAddress(): string
  • Gets or sets the target address of the hyperlink. For bookmarks in an external document, separate the sub-address with a #, such as "File.xlsx#Sheet1!C3". For email addresses, use a target string with the format "mailto:joe@company.com" or "mailto:joe@company.com?subject=Email%20Subject".

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the specified value is longer than 256 characters.

    See

    • [[target]]
    • [[targetCell]]
    • [[targetRegion]]
    • [[targetNamedReference]]

    Returns string

  • set targetAddress(a): void
  • Parameters

    • a: string

    Returns void

  • get targetCell(): WorksheetCell
  • Gets or sets the target cell of the hyperlink.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the value assigned is a cell which is not from the same workbook as the owning workbook of the hyperlink.

    See

    • [[target]]
    • [[targetAddress]]
    • [[targetRegion]]
    • [[targetNamedReference]]

    Returns WorksheetCell

  • set targetCell(a): void
  • Parameters

    Returns void

  • get targetNamedReference(): NamedReference
  • Gets or sets the target named reference of the hyperlink.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the value assigned is a named reference which is not from the same workbook as the owning workbook of the hyperlink.

    See

    • [[target]]
    • [[targetAddress]]
    • [[targetCell]]
    • [[targetRegion]]

    Returns NamedReference

  • set targetNamedReference(a): void
  • Parameters

    Returns void

  • get targetRegion(): WorksheetRegion
  • Gets or sets the target region of the hyperlink.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the value assigned is a region which is not from the same workbook as the owning workbook of the hyperlink.

    See

    • [[target]]
    • [[targetAddress]]
    • [[targetCell]]
    • [[targetNamedReference]]

    Returns WorksheetRegion

  • set targetRegion(a): void
  • Parameters

    Returns void

  • get toolTip(): string
  • Gets or sets the text to use in a tool tip when hovering over the source cell or region, or null to use the default tool tip.

    Throws

    [[InvalidOperationException]] Occurs when [[isSealed]] is True.

    Throws

    [[ArgumentException]] Occurs when the specified value is longer than 256 characters.

    Returns string

  • set toolTip(a): void
  • Parameters

    • a: string

    Returns void

  • get worksheet(): Worksheet
  • Gets the worksheet to which the hyperlink belongs.

    Returns Worksheet

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Gets the string representation of the hyperlink.

    Returns string

  • 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