SharpCell

Hyperlink

public sealed class Hyperlink

Namespace SharpCell · package SharpCell

A hyperlink on a cell: a web or e-mail address, a file, or a place in the workbook. The cell's value is what Excel shows; the link neither changes it nor applies the Hyperlink cell style.

Constructors

Hyperlink(string, string)

public Hyperlink(string target, string? tooltip = null)

A link to target, with an optional tooltip.

Parameters

Exceptions

Properties

IsInWorkbook

public bool IsInWorkbook { get; }

Whether the link goes to a place in this workbook, that is, the target starts with #.

Target

public string Target { get; }

Where the link goes, as given to the constructor.

An empty fragment is dropped when the link is saved: https://example.com/# reads back as https://example.com/.

Tooltip

public string? Tooltip { get; }

The ScreenTip, or null for none.

Methods

public bool Equals(Hyperlink? other)

Whether the other link has the same target and tooltip, compared ordinally.

Equals(object)

public override bool Equals(object? obj)

Whether obj is the same link.

GetHashCode()

public override int GetHashCode()

A hash code consistent with Hyperlink.Equals.

ToString()

public override string ToString()

The target.