This function allows to add Hyperlink to a cell of an excel sheet.
1 excel.Cell.setCellHyperlink
<excel.Cell.setCellHyperlink>
<cl /> +
<link /> +
<title /> +
</excel.Cell.setCellHyperlink>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ecl | Cell | Cell in which you want to place the link. | |||
Elink | string | Link in format http://domain. | |||
Etitle | string | Text which will be showed in the link. |
Example
Place in an Excel source a SQL displacing the content of the rows.
Copy
<xsql-script name='sample_excel_Cell_setCellHyperlink'> <body> <!-- Create an empty excel file --> <set name="m_excel"> <excel.Workbook/> </set> <!-- Create a m_sheet fot the excel file --> <set name="m_sheet"> <excel.Workbook.createSheet name="Manuel"> <m_excel /> </excel.Workbook.createSheet> </set> <set name="m_cell"> <excel.Sheet.createCell row="10" col="5"> <m_hoja /> </excel.Sheet.createCell> </set> <excel.Cell.setCellHyperlink> <m_cell /> <string>http://www.google.es</string> <string>GO TO GOOGLE</string> </excel.Cell.setCellHyperlink> <!-- The excel is stored in a temporal file test.xls --> <excel.Workbook.write> <m_excel /> <file name="test.xls" type="absolute"/> </excel.Workbook.write> </body> </xsql-script>