These functions allow adding thread comments to spreadsheets.
This is not yet supported by all spreadsheet software. A threaded comment must
be tied to a person created by wb_add_person().
Usage
wb_add_thread(
wb,
sheet = current_sheet(),
dims = "A1",
comment = NULL,
person_id,
reply = FALSE,
resolve = FALSE
)
wb_get_thread(wb, sheet = current_sheet(), dims = NULL)Details
If a threaded comment is added, it needs a person attached to it.
The default is to create a person with provider id "None".
Other providers are possible with specific values for id and user_id.
If you require the following, create a workbook via spreadsheet software load
it and get the values with wb_get_person()
See also
Other worksheet content functions:
col_widths-wb,
filter-wb,
grouping-wb,
named_region-wb,
row_heights-wb,
wb_add_conditional_formatting(),
wb_add_data(),
wb_add_data_table(),
wb_add_formula(),
wb_add_hyperlink(),
wb_add_pivot_table(),
wb_add_slicer(),
wb_freeze_pane(),
wb_merge_cells()
Examples
wb <- wb_workbook()$add_worksheet()
# Add a person to the workbook.
wb$add_person(name = "someone who likes to edit workbooks")
pid <- wb$get_person(name = "someone who likes to edit workbooks")$id
# write a comment to a thread, reply to one and solve some
wb <- wb_add_thread(wb, dims = "A1", comment = "wow it works!", person_id = pid)
wb <- wb_add_thread(wb, dims = "A2", comment = "indeed", person_id = pid, resolve = TRUE)
wb <- wb_add_thread(wb, dims = "A1", comment = "so cool", person_id = pid, reply = TRUE)
