save_as_html | R Documentation |
save a flextable in an 'HTML' file. This function is useful to save the flextable in 'HTML' file without using R Markdown (it is highly recommanded to use R Markdown instead).
save_as_html(..., values = NULL, path, lang = "en", title = " ")
... |
flextable objects, objects, possibly named. If named objects, names are used as titles. |
values |
a list (possibly named), each element is a flextable object. If named objects, names are
used as titles. If provided, argument |
path |
HTML file to be created |
lang |
language of the document using IETF language tags |
title |
page title |
a string containing the full name of the generated file
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_image()
,
save_as_pptx()
,
save_as_rtf()
,
to_html.flextable()
ft1 <- flextable(head(iris))
tf1 <- tempfile(fileext = ".html")
if (rmarkdown::pandoc_available()) {
save_as_html(ft1, path = tf1)
# browseURL(tf1)
}
ft2 <- flextable(head(mtcars))
tf2 <- tempfile(fileext = ".html")
if (rmarkdown::pandoc_available()) {
save_as_html(
`iris table` = ft1,
`mtcars table` = ft2,
path = tf2,
title = "rhoooo"
)
# browseURL(tf2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.