to_html.flextable | R Documentation |
Generate HTML code of corresponding flextable as an HTML table or an HTML image.
## S3 method for class 'flextable'
to_html(x, type = c("table", "img"), ...)
x |
a flextable object |
type |
output type. one of "table" or "img". |
... |
unused |
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.
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()
library(officer)
library(flextable)
x <- to_html(as_flextable(cars))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.