# NOT RUN {
library(officer)
ft <- flextable(head(mtcars))
ft <- theme_zebra(ft)
# }
# NOT RUN {
ft <- autofit(ft)
# }
# NOT RUN {
doc <- read_docx()
doc <- body_add_flextable(doc, value = ft)
# }
# NOT RUN {
print(doc, target = "test.docx")
# }
Run the code above in your browser using DataLab