I'm creating a pretty basic report adding small tables to a docx in a loop. I'd like to fit them to the width of the page or at least align the table (not cells' content) to the left. It should be quite an easy task but I found only references related to:
I tried the solutions suggested in the references but they did not work. Here what I'm using (commented rows to show other attempts):
tbl.params = flextable(fdata) %>%
delete_part(part = "header") %>%
#autofit() %>%
border_remove() %>%
border_inner_h(part="body", border = small_border ) %>%
hline_top( border = big_border, part="body") %>%
bold(j=1) %>%
set_table_properties(layout = "autofit")
#fit_to_width(7.5)
Am I making a mistake or missing something?
I'm looking for solutions in "pure" Officer
(if available).