ExcelHyperlinksCollectionAddHyperlink Method
Adds a new hyperlink of the specified type to the hyperlinks collection of a worksheet.
The hyperlink is attached to the specified source range and poins to the specified target address.
The target address can be a URL, a file or folder in the file system or a range adress from a worksheet
function of the hyperlink type.
Namespace: Winnovative.ExcelLibAssembly: WnvXls_NetCore (in WnvXls_NetCore.dll) Version: 11.0.0
public ExcelHyperlink AddHyperlink(
ExcelHyperlinkType type,
ExcelRange sourceRange,
string targetAddress
)
Public Function AddHyperlink (
type As ExcelHyperlinkType,
sourceRange As ExcelRange,
targetAddress As String
) As ExcelHyperlink
public:
ExcelHyperlink^ AddHyperlink(
ExcelHyperlinkType type,
ExcelRange^ sourceRange,
String^ targetAddress
)
member AddHyperlink :
type : ExcelHyperlinkType *
sourceRange : ExcelRange *
targetAddress : string -> ExcelHyperlink
- type ExcelHyperlinkType
- The URL address to which this hyperlink points.
- sourceRange ExcelRange
- The range to which the hyperlink is attached.
- targetAddress String
- The target address to which this hyperlink points.
The target address can be a URL (e.g. 'http://www.mysite.com' or 'maito://support@mysite.com'),
a file or folder in the file system (e.g. 'file://C:\MyFolder' or 'file://C:\MyFolder\MyFile.txt'
or file://\\MyServer\MyFolder)
or a range adress from the same worksheet or another worksheet (e.g. 'MySheet!A1' or 'A1:B2' ) function of the hyperlink type.
When the address is a range address, the name of the range cannot contain white spaces. You can define a named range if the target
worksheet name contains spaces.
ExcelHyperlinkThe newly created hyperlink.