Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Creates a new hyperlink in the specified area of cells. All cell values in the area will be converted to hyperlinks.

Signature
C#C#
Wiki Markup
{description}
{excerpt}Creates a new hyperlink in the specified area of cells. All cell values in the area will be converted to hyperlinks.{excerpt}

{signature:C#}
 public Hyperlink CreateHyperlink(Area area, System.String href, System.String text)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function CreateHyperlink(ByVal area As Area, ByVal href As String, ByVal text As String) As Hyperlink
Parameters
Param
areaarea

An Area object representing the cells that will be converted to hyperlinks.

Param
hrefhref

The hyperlink's destination.

Param
texttext

The text to display in the link.

Remarks
Creating a hyperlink to another cell or range within the workbook is not supported. However, you may use a hyperlink formula to achieve the same functionality. For example, to link to cell C3 you would use the formula
{signature}
{parameters}
{param:area}An [Area|Area] object representing the cells that will be converted to hyperlinks.{param}
{param:href}The hyperlink's destination.{param}
{param:text}The text to display in the link.{param}
{remarks}
Creating a hyperlink to another cell or range within the workbook is not supported. However, you may use a hyperlink formula to achieve the same functionality. For example, to link to cell C3 you would use the formula {{=HYPERLINK("#Sheet1!C3", "Link to C3")}}. Setting [Cell.Formula] with this formula will create the internal hyperlink.
Returns

A new Hyperlink object with the specified destination URL and display text.


{remarks}
{returns}A new [Hyperlink|Hyperlink] object with the specified destination URL and display text.{returns}
{example}{code:csharp|title=C#}
links.CreateHyperlink(a, "http://www.softartisans.com", "SoftArtisans");
{code}
{code:vb.net
|title=vb.net
}
links.CreateHyperlink(a, "http://www.softartisans.com", "SoftArtisans"){code}

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle