Adds a URL hyperlink to one worksheet cell and writes the display text to that cell.
Syntax
function AddHyperlink(Row, Col: Integer; Address: WideString): IXLSHyperLink; overload;
function AddHyperlink(Row, Col: Integer; Address: WideString; TextToDisplay: WideString): IXLSHyperLink; overload;
function AddHyperlink(Row, Col: Integer; Address: WideString; TextToDisplay: WideString; ScreenTip: WideString): IXLSHyperLink; overload;
Parameters
| Row, Col |
1-based worksheet coordinates of the target cell. |
| Address |
URL or file address for the hyperlink. |
| TextToDisplay |
Text written to the target cell and stored as the hyperlink display text. If omitted or empty, the address is used. |
| ScreenTip |
Optional tooltip shown by spreadsheet applications. |
Example
Workbook.Sheets[1].AddHyperlink(
1, 2,
'https://www.loslab.com',
'Visit losLab',
'Open site');
See also