Docs HotXLS

IXLSHyperLinks-interface

Unité : lxHandle
Représente the collection of hyperlinks for a Worksheet or range. Each hyperlink is represented by an IXLSHyperlink Interface

Using the Hyperlinks Collection

Use the Hyperlinks property to return the IXLSHyperlinks collection
L'exemple suivant deletes the hyperlinks on Worksheet one for a link that contains the word 'Microsoft' in the description
With Workbook.Sheets[1] do begin
   if Hyperlinks.Count > 0 then begin
      for i := Hyperlinks.Count downto 1 do begin
        if Pos('Microsoft', Hyperlinks[i].Description) > 0 then
           Hyperlinks[i].Delete;
      end;
   end;
end;
Use the Add method to create a hyperlink and add it to the Hyperlinks collection
L'exemple suivant creates a new hyperlink for cell A8
With Workbook.Sheets[1] do begin
   Hyperlinks.Add(Range['A8','A8'], 'https://www.loslab.com/HotXLS.html');
end;
Use the Delete method to remove hyperlinks from a Worksheet or range
L'exemple suivant deletes hyperlinks from Worksheet one
Workbook.Sheets[1].Hyperlinks.Delete;
L'exemple suivant deletes hyperlinks from range A1:F10 on Worksheet one
Workbook.Sheets[1].Range['A1','F10'].Hyperlinks.Delete;

Propriétés

Méthodes