Skip to contents

print a flextable object to format html, docx, pptx or as text (not for display but for informative purpose). This function is to be used in an interactive context.

Usage

# S3 method for class 'flextable'
print(x, preview = "html", align = "center", ...)

Arguments

x

flextable object

preview

preview type, one of c("html", "pptx", "docx", "rtf", "pdf, "log"). When "log" is used, a description of the flextable is printed.

align

left, center (default) or right. Only for docx/html/pdf.

...

arguments for 'pdf_document' call when preview is "pdf".

Note

When argument preview is set to "docx" or "pptx", an external client linked to these formats (Office is installed) is used to edit a document. The document is saved in the temporary directory of the R session and will be removed when R session will be ended.

When argument preview is set to "html", an external client linked to these HTML format is used to display the table. If RStudio is used, the Viewer is used to display the table.

Note also that a print method is used when flextable are used within R markdown documents. See knit_print.flextable().