This function is based on rtables.officer::export_as_docx().
See notes to understand why this is experimental.
export_as_docx_j(
tt,
tblid,
output_dir,
theme = theme_docx_default_j(font = "Times New Roman", font_size = 9L, bold = NULL),
add_page_break = FALSE,
titles_as_header = TRUE,
integrate_footers = TRUE,
section_properties = officer::prop_section(page_size = officer::page_size(width = 11,
height = 8.5, orient = orientation), page_margins = officer::page_mar(bottom = 1, top
= 1, right = 1, left = 1, gutter = 0, footer = 1, header = 1)),
doc_metadata = NULL,
template_file = system.file("template_file.docx", package = "junco"),
orientation = "portrait",
paginate = FALSE,
nosplitin = character(),
string_map = junco::default_str_map,
markup_df_docx = dps_markup_df_docx,
combined_docx = FALSE,
tlgtype = (utils::getFromNamespace("tlg_type", "junco"))(tt),
col_gap = ifelse(tlgtype == "Listing", 0.5, 3),
pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE),
round_type = formatters::obj_round_type(tt),
alignments = list(),
border = flextable::fp_border_default(width = 0.75, color = "black"),
border_mat = make_header_bordmat(obj = tt),
watermark = FALSE,
...
)a VTableTree or a listing_df object to export.
Character. Output ID to be displayed in the Title and last line of footer.
a directory path to save the docx.
(optional) a function factory. See theme_docx_default_j() or rtables.officer::theme_docx_default() for more details.
(optional) Default = FALSE.
(optional) Default = TRUE.
(optional) Default = TRUE.
(optional). A "prop_section" object containing information about page size, orientation, margins, etc. See officer::prop_section() for more details. No need to be specified by end user.
(optional). Default = NULL.
(optional). Default = "doc/template_file.docx". Paragraph styles are inherited from this file.
(optional) Default = "portrait". One of: "portrait", "landscape".
(optional) Default = FALSE.
(optional) Default = character(). Named list.
(optional) Default = default_str_map.
(optional) Default = dps_markup_df_docx.
(optional). Default = FALSE. Whether to also export an "allparts" docx version.
(optional). No need to be specified by end user.
(optional). Default = 3 (Tables) or 0.5 (Listings).
(optional). Whether to display page numbers. Only applicable to listings (i.e. for tables and figures this argument is ignored).
("iec" or "sas")
the type of rounding to perform. iec,
the default, performs rounding compliant with IEC 60559, while
sas performs nearest-value rounding consistent with rounding within SAS.
See [formatters::format_value()] for more details.
(list)
List of named lists. Vectorized.
(Default = list()) Used to specify individual column or cell alignments.
Each named list contains row, col, and value.
(optional) an fp_border object.
(matrix)
A m x k matrix where m is the number of columns of tt
and k is the number of lines the header takes up. See tidytlg::add_bottom_borders
for what the matrix should contain. Users should only specify this when the
default behavior does not meet their needs.
(logical)
whether to display the watermark "Confidential".
By default, this is set to FALSE. In the future, this argument will be the
actual watermark (i.e. a string) to display.
other parameters.