Description Usage Arguments Author(s) References Examples
Add a hyperlink to a worksheet.
1 2 3 4 | xlsx.addHyperlink(wb, sheet, address, friendlyName,
fontColor = "blue", fontSize = 12,
isBold = FALSE, isItalic = FALSE,
startRow = NULL, startCol = 2)
|
wb |
workbook object |
sheet |
sheet object |
address |
text indicating the url |
friendlyName |
text specifying the name of the link |
fontColor |
the color to use for the text of the link |
fontSize |
the font size of the text |
isBold |
if TRUE, the text is written in bold format |
isItalic |
if TRUE, the text is written in italic format |
startRow |
a numeric value specifying the starting row |
startCol |
a numeric value specifying the starting column |
Alboukadel Kassambara <alboukadel.kassambara@gmail.com>
http://www.sthda.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create an Excel workbook. Both .xls and .xlsx file formats can be used.
wb <- createWorkbook(type="xlsx")
# Create a sheet in that workbook
sheet <- xlsx::createSheet(wb, sheetName = "example1")
# Add Hyperlink
#+++++++++++++++++++++++++++++
xlsx.addHeader(wb, sheet, " Add Hyperlink", level=2, underline=1)
xlsx.addLineBreak(sheet, 1)
xlsx.addHyperlink(wb, sheet, "http://www.sthda.com", "Click-me!", fontSize=12)
xlsx.addLineBreak(sheet, 2)
# saving a workbook to an Excel file and write the file to the disk.
saveWorkbook(wb, "examples_add_hyperlink.xlsx")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.