% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xl_format.R
\name{xl_format}
\alias{xl_format}
\alias{+.xl_format}
\title{Combine cell-formatting groups into a single format}
\usage{
xl_format(..., quote_prefix = NA, hyperlink = NA)

\method{+}{xl_format}(e1, e2)
}
\arguments{
\item{...}{[xl_format] objects (and/or `NULL`s, which are ignored).  May also
include the scalar flags `quote_prefix` and `hyperlink`.}

\item{quote_prefix}{Logical; treat the cell contents as literal text (as if
prefixed with a single quote in Excel).}

\item{hyperlink}{Logical; apply the internal hyperlink style flag (advanced).}

\item{e1, e2}{[xl_format] objects to combine.}
}
\value{
A combined [xl_format] object.
}
\description{
`xl_format()` merges any number of [xl_format] objects (typically the
single-group objects returned by [xl_font], [xl_fill], [xl_border],
[xl_align], [xl_num_format] and [xl_protection]) into one combined format.
The `+` operator does the same for two formats.

Merging is right-biased and works property-by-property: where two formats set
the *same* property the later one wins, but properties set by only one side
are all preserved.  So partial groups accumulate rather than overwrite.
}
\examples{
xl_format(xl_font(bold = TRUE), xl_border(bottom = "thin"),
          xl_num_format("#,##0.00"))

# equivalent, using +
xl_font(bold = TRUE) + xl_border(bottom = "thin") + xl_num_format("#,##0.00")
}
\seealso{
[xl_font], [xl_fill], [xl_border], [xl_align], [xl_num_format],
  [xl_protection], [xl_color]

Other cell formatting:
\code{\link[=is_xl_format]{is_xl_format()}},
\code{\link[=xl_color]{xl_color()}},
\code{\link{xl_format_groups}}
}
\concept{cell formatting}
