powered by
You can add Form Control to a cell. The three supported types are a Checkbox, a Radio button, or a Drop menu.
wb_add_form_control( wb, sheet = current_sheet(), dims = "A1", type = c("Checkbox", "Radio", "Drop"), text = NULL, link = NULL, range = NULL, checked = FALSE )
The wbWorkbook object, invisibly.
wbWorkbook
A Workbook object
A worksheet of the workbook
A single cell as spreadsheet dimension, e.g. "A1".
A type "Checkbox" (the default), "Radio" a radio button or "Drop" a drop down menu
A text to be shown next to the Checkbox or radio button (optional)
A cell range to link to
A cell range used as input
A logical indicating if the Checkbox or Radio button is checked
wb <- wb_workbook() %>% wb_add_worksheet() %>% wb_add_form_control() # Add wb$add_form_control(dims = "C5", type = "Radio", checked = TRUE)
Run the code above in your browser using DataLab