Version

Working with Hyperlinks (XamSpreadsheet)

Purpose

This topic explains what type of hyperlinks are supported and how to operate with them.

Required background

The following table lists the concept and topics required as a prerequisite to understanding this topic.

Type Content

Concept

Infragistics Excel Engine

Topic Purpose

In this section you will find information that will help you to better understand the object model and the functionalities of the Infragistics Excel Engine .

This topic explains in details the features of the XamSpreadsheet control from developer perspective.

This topic provides an overview of the visual elements of the XamSpreadsheet control.

This topic explains what actions can be performed by the user when interacting with hyperlinks.

In this topic

This topic contains the following sections:

Hyperlinks Types

The XamSpreadsheet's control supports two type of hyperlinks:

These hyperlinks are created by instantiating the WorksheetHyperlink class and adding the newly created object to the Worksheet's Hyperlinks collection. These links may span over a single cell or multiple cells range. For more information about creating and configuring such hyperlinks look at the Adding a Hyperlink to a Worksheet topic

These hyperlinks are created by entering a "HYPERLINK" function in a worksheet’s cell and they occupy only the cell in which they are defined. The following formula example will add a formula hyperlink to the Infragistics website:

=HYPERLINK("http://www.infragistics.com", "Infragistics")

Note
Note

The formula hyperlinks cannot have custom tooltips. Only the default tooltip is shown for them.

Note
Note

The "followed" state of the worksheet hyperlinks is retained between undo and redo operations for worksheet hyperlinks, but not for the formula hyperlinks.

Hyperlinks Command Support

Command support

The following is a list of the commands associated with hyperlinks with a brief description:

Command Details

OpenHyperlink

This command will only be enabled when a single cell (or a single merged cell) is selected and that cell has a hyperlink (either a worksheet hyperlink or a formula hyperlink). The command will open/follow the selected cell’s hyperlink target.

RemoveHyperlinks

This command will remove one or more hyperlinks that are either fully contained within the current selection or that fully contain the selection. This is enabled if there are one or more worksheet hyperlinks that may be removed based on the selection.

Note
Note

This command is not able to remove formula hyperlink(s) and is not enabled when the selection contains only formula hyperlink(s).

ClearHyperlinks

This command is almost identical to RemoveHyperlinks except that when removing the hyperlinks the formatting of the cell will be preserved.

Note
Note

If the current selection intersects with but does not contain a merged cell, the command will not be allowed.

Hyperlinks Event

Event summary

The XamSpreadsheet control supports one cancelable hyperlinks-related event - HyperlinkExecuting which is fired prior to opening the hyperlink.

In the event handler you have the abilities to:

  • Cancel the event, which will prevent the target to be opened and the hyperlink to become followed

  • Set or obtain the working directory when the hyperlink is targeting a file (so that you can specify file name only in the hyperlink’s target)

  • Modify the hyperlink’s properties

Related Content

The following topic provides additional information related to this topic.

Topic Purpose

This topic explains how to perform different operations with the control using commands.