setComments: Add comment to a specified cell

Description Usage Arguments Examples

View source: R/comments.R

Description

This function is used to add comment to the specified cell

Usage

1
setComments(tableId, cellId, comment)

Arguments

tableId

the id of the table for which the comment is to be added

cellId

the id of the cell for which the comment is to be added

comment

the comment that is to be added to the cell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if(interactive()) {
 library(shiny)
 library(excelR)
 shinyApp(
  ui = fluidPage(excelOutput("table", height = 175),
       actionButton('comment', 'Set Comments to cell A1')),
     server = function(input, output, session) {
         output$table <- renderExcel(excelTable(data = head(iris)))
         observeEvent(input$comment,{
             setComments("table", "A1", "This is a comment")
         })
     }
     )
 }

Example output



excelR documentation built on March 13, 2020, 1:31 a.m.