NativeExcel suite v3.x

IXLSHyperLinks interface

Unit: nExcel
Represents 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.
The following example 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.
The following example creates a new hyperlink for cell A8.
With WorkBook.Sheets[1] do begin
   Hyperlinks.Add(Range['A8','A8'], 'http://www.nika-soft.com/');
end;
Use the Delete method to remove hyperlinks from a worksheet or range.
The following example deletes hyperlinks from worksheet one.
WorkBook.Sheets[1].Hyperlinks.Delete;
The following example deletes hyperlinks from range A1:F10 on worksheet one.
WorkBook.Sheets[1].Range['A1','F10'].Hyperlinks.Delete;

Properties

Methods

Copyright © NikaSoft 2004-2013