% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printers.R
\name{to_html.flextable}
\alias{to_html.flextable}
\title{Get HTML code as a string}
\usage{
\method{to_html}{flextable}(x, type = c("table", "img"), ...)
}
\arguments{
\item{x}{a 'flextable' object, see \link{flextable-package} to learn how to create
'flextable' object.}

\item{type}{output type. one of "table" or "img".}

\item{...}{unused}
}
\value{
If \code{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.
}
\description{
Generate HTML code of corresponding
flextable as an HTML table or an HTML image.
}
\examples{
library(officer)
library(flextable)
x <- to_html(as_flextable(cars))
}
\seealso{
Other functions for flextable output and export:
\code{\link[=df_printer]{df_printer()}},
\code{\link[=flextable_to_rmd]{flextable_to_rmd()}},
\code{\link[=gen_grob]{gen_grob()}},
\code{\link[=htmltools_value]{htmltools_value()}},
\code{\link[=knit_print.flextable]{knit_print.flextable()}},
\code{\link[=plot.flextable]{plot.flextable()}},
\code{\link[=print.flextable]{print.flextable()}},
\code{\link[=repair_docx]{repair_docx()}},
\code{\link[=save_as_docx]{save_as_docx()}},
\code{\link[=save_as_html]{save_as_html()}},
\code{\link[=save_as_image]{save_as_image()}},
\code{\link[=save_as_pptx]{save_as_pptx()}},
\code{\link[=save_as_rtf]{save_as_rtf()}},
\code{\link[=wrap_flextable]{wrap_flextable()}}
}
\concept{flextable_output_export}
