Dokumentace HotXLS

AddHyperlink metoda

Adds a hyperlink to one list buňka by coordinates or A1-style reference and writes the display text to that buňka

Syntaxe

function AddHyperlink(Row, Col: Integer; Address: WideString): IXLSHyperLink; overload;
function AddHyperlink(ARange: WideString; Address: WideString): IXLSHyperLink; overload;
function AddHyperlink(Row, Col: Integer; Address: WideString; TextToDisplay: WideString): IXLSHyperLink; overload;
function AddHyperlink(ARange: WideString; Address: WideString; TextToDisplay: WideString): IXLSHyperLink; overload;
function AddHyperlink(Row, Col: Integer; Address: WideString; TextToDisplay: WideString; ScreenTip: WideString): IXLSHyperLink; overload;
function AddHyperlink(ARange: WideString; Address: WideString; TextToDisplay: WideString; ScreenTip: WideString): IXLSHyperLink; overload;
    

Parametry

Row, Col 1-based list coordinates of the target buňka
ARange A1-style target buňka reference
Address URL, soubor address, or sešit target for the hyperlink
TextToDisplay Text written to the target buňka and stored as the hyperlink display text. If omitted or empty, the address is used
ScreenTip Optional tooltip shown by spreadsheet applications

Příklad

Workbook.Sheets[1].AddHyperlink(
  1, 2,
  'https://www.loslab.com',
  'Visit losLab',
  'Open site');

Workbook.Sheets[1].AddHyperlink(
  'C4',
  'www.loslab.com/docs',
  'Read docs',
  'Open documentation');
    

Viz také

TXLSWorksheet třída
TXLSWorksheet.Hyperlinks vlastnost
IXLSHyperLinks.Add metoda