| body_add_flextable {flextable} | R Documentation |
add a flextable into a Word document.
body_add_flextable(x, value, align = "center", pos = "after")
x |
an rdocx object |
value |
|
align |
left, center (default) or right. |
pos |
where to add the flextable relative to the cursor, one of "after", "before", "on" (end of line). |
library(officer) ft <- flextable(head(mtcars)) ft <- theme_zebra(ft) ft <- autofit(ft) doc <- read_docx() doc <- body_add_flextable(doc, value = ft) print(doc, target = "test.docx")