writeComment | R Documentation |
Write a Comment object to a worksheet
writeComment(wb, sheet, col, row, comment, xy = NULL)
wb |
A workbook object |
sheet |
A vector of names or indices of worksheets |
col |
Column a column number of letter |
row |
A row number. |
comment |
A Comment object. See |
xy |
An alternative to specifying |
createComment()
wb <- createWorkbook()
addWorksheet(wb, "Sheet 1")
c1 <- createComment(comment = "this is comment")
writeComment(wb, 1, col = "B", row = 10, comment = c1)
s1 <- createStyle(fontSize = 12, fontColour = "red", textDecoration = c("BOLD"))
s2 <- createStyle(fontSize = 9, fontColour = "black")
c2 <- createComment(comment = c("This Part Bold red\n\n", "This part black"), style = c(s1, s2))
c2
writeComment(wb, 1, col = 6, row = 3, comment = c2)
## Not run:
saveWorkbook(wb, file = "writeCommentExample.xlsx", overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.