SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IHyperlink

    Represents a hyperlink for linking to either a URL or a cell address.

    interface IHyperlink {
        isIHyperlink: true;
        delete(options?: ITransaction.OperationOptions): void;
        getAddress(): string;
        getScreenTip(): string | null;
        getTarget(): string;
        getTextToDisplay(): string;
        open(target?: "_self" | "_blank", features?: string): Promise<boolean>;
    }
    Index
    isIHyperlink: true

    For runtime type checking.

    • Where the link points; a url, a location within this workbook, or both.

      Returns string

      The two destinations are folded into this single value and separated by a #:

      • https://sheetxl.com/ - a url.
      • #Sheet1!A1 - a location within this workbook. (nothing precedes the #)
      • https://sheetxl.com/#pricing - a url with a fragment.

      Excel keeps the two apart as an address and a document reference; folding them is a deliberate difference and a leading # is the only way to write an internal link.

      A location within this workbook is a string and not a reference. It does not follow the cells it points at when rows or columns are inserted, deleted, or moved. (The cell the link is attached to does move.)

    • Text showing additional information about the link that will be displayed as a tooltip.

      Returns string | null

      Excel has an undocumented screen tip length limit of 255 characters.

    • Specifies the target frame to use when opening this hyperlink.

      Returns string

      This has no counterpart in Excel; it is ours and applies to links opened in a browser.

      _self for a location within this workbook or a mailto:/tel:/sms: address (handled by another application, so there is nothing to show in a new tab), otherwise _blank.

    • The text shown for the link. This is the text of the cell it is attached to, falling back to getAddress() when the cell has none.

      Returns string

    • Open the hyperlink.

      Parameters

      • Optionaltarget: "_self" | "_blank"

        Specifies where to open the linked document. DefaultValue getTarget().

      • Optionalfeatures: string

        Passed to the window open context for external resource.

      Returns Promise<boolean>