Is there a way using officer
or officedown
to update an existing table in Word? I tried to add a bookmark to an entire table in Word (say "tb1_bk"), but then I don't know how I could modify it.
As I found no way to directly load it in shiny app as a dataframe to further save it after modification, I tried first to simply add a new table after my bookmarked table. However, body_add_table()
needs a cursor to know where to add it. I tried cursor_bookmark(doc, "tb1_bk")
but it says (as mentioned in the documentation) that Error: bookmark 'tb1_bk' does not end in the same paragraph (or is on the whole paragraph)
.
I understand of course this problem, but I was wondering then how I could load a table from Word with a specific bookmark to later modify it in R and save the changes back to the Word file.