IXlsHyperlink
COM interface ( getting help with interfaces )

 

interface IXlsHyperlink : IDispatch
{

  [id(1),propput ] HRESULT Label([in]BSTR label);
  [id(2),propput ] HRESULT FileTarget([in]BSTR filename);
  [id(2),propget ] HRESULT FileTarget([out, retval]BSTR* filename);
  [id(3),propput ] HRESULT UrlTarget([in]BSTR url);
  [id(3),propget ] HRESULT UrlTarget([out, retval]BSTR* url);
  [id(4)         ] HRESULT CellAnchor([in]BSTR sheetname, [in]int row, [in]int col);
  [id(5),propput ] HRESULT NamedAnchor([in]BSTR name);
  [id(5),propget ] HRESULT NamedAnchor([out, retval]BSTR* name);
  [id(6),propput ] HRESULT RenderAsHyperlink([in]BOOL renderingstyle);
  [id(7),propput ] HRESULT RelativeFilepath([in]BOOL relativefilepath);
  [id(8),propput ] HRESULT Caption([in]BSTR caption);
  [id(8),propget ] HRESULT Caption([out, retval]BSTR* caption);
  [id(9),propget ] HRESULT FullCellAnchor([out, retval]BSTR* cellanchor);
  [id(10)        ] HRESULT Delete();
  [id(11),propget] HRESULT Top([out, retval]int* row);
  [id(12),propget] HRESULT Left([out, retval]int* col);
  [id(13),propput] HRESULT UrlEncode([in]BOOL bUrlEncode);

}

 

HRESULT Label([in]BSTR label);
defines the label of the hyperlink. The label is not always the place where you define the url, although in most cases the label itself reflects the url the hyperlink points to.

HRESULT FileTarget([in]BSTR filename);
defines a local file hyperlink target. Uses this property to link to an agnostic file like a Word file, a PDF file, an Excel workbook, and in fact pretty much anything else. If you use the file target, don't use the url target. When the file is an Excel workbook, you can use the cell anchor or the named anchor to define a target within that Excel workbook or another Excel worbook. See below.

HRESULT FileTarget([out, retval]BSTR* filename);
returns the local file hyperlink target. Uses this property to link to an agnostic file like a Word file, a PDF file, an Excel workbook, and in fact pretty much anything else.

HRESULT UrlTarget([in]BSTR url);
defines a url target. If you use a url, don't use the file target above. When an url is defined, an anchor can be added to it by using the named anchor property below. Example : url = "http://www.cnn.com", named anchor = "WeatherBox".

HRESULT UrlTarget([out, retval]BSTR* url);
returns the url target.

HRESULT CellAnchor([in]BSTR sheetname, [in]int row, [in]int col);
used in combination with a file target, when that file target is an Excel workbook. The cell anchor cannot be used in combination to the named anchor, and defines a cell reference. Instead of passing the cell reference as a (row,col) pair, you can use the AxBy notation in the sheetname, as in "Sheet2!F5".

HRESULT NamedAnchor([in]BSTR name);
used in combination with a file target or url target. The named anchor cannot be used in combination to the cell anchor. When the target is a url, it adds an anchor so that the web page gets scrolled to that anchor. When the target is an Excel file, the named anchor defines an existing named range in the target Excel workbook to scroll to. Please refer to your Excel documentation for more information on named ranges.

HRESULT NamedAnchor([out, retval]BSTR* name);
returns the named anchor.

HRESULT RenderAsHyperlink([in]BOOL renderingstyle);
sets the style used to render the hyperlink in the cell. Default value is TRUE, which means the hyperlink will show as a blue and underlined text. When set to FALSE, xlsgen uses the current style.

HRESULT RelativeFilepath([in]BOOL relativefilepath);
when used in combination with file targets, tells whether the file path should be treated as relative to the file being generated by xlsgen. Default is FALSE, which means file paths are treated as full file paths of the form C:\ccc\...\myfile.doc.

HRESULT Caption([in]BSTR caption);
overrides the caption of the hyperlink.

HRESULT Caption([out, retval]BSTR* caption);
returns the caption of the hyperlink.

HRESULT FullCellAnchor([out, retval]BSTR* cellanchor);
returns the cell anchor, complete with the sheet name and the A1 reference if applicable.

HRESULT Delete();
deletes the hyperlink.

HRESULT Top([out, retval]int* row);
returns the top row location of the hyperlink.

HRESULT Left([out, retval]int* col);
returns the top left location of the hyperlink.

HRESULT UrlEncode([in]BOOL bUrlEncode);
sets whether the passed url should be url-encoded by xlsgen. Default is : TRUE.