Learn R Programming

flextable (version 0.9.5)

to_html.flextable: Get HTML code as a string

Description

Generate HTML code of corresponding flextable as an HTML table or an HTML image.

Usage

# S3 method for flextable
to_html(x, type = c("table", "img"), ...)

Value

If type='img', the result will be a string containing HTML code of an image tag, otherwise, the result will be a string containing HTML code of a table tag.

Arguments

x

a flextable object

type

output type. one of "table" or "img".

...

unused

See Also

Other flextable print function: as_raster(), df_printer(), flextable_to_rmd(), gen_grob(), htmltools_value(), knit_print.flextable(), plot.flextable(), print.flextable(), save_as_docx(), save_as_html(), save_as_image(), save_as_pptx(), save_as_rtf()

Examples

Run this code
library(officer)
library(flextable)
x <- to_html(as_flextable(cars))

Run the code above in your browser using DataLab