% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xl_format.R
\name{xl_format_groups}
\alias{xl_format_groups}
\alias{xl_font}
\alias{xl_fill}
\alias{xl_border}
\alias{xl_align}
\alias{xl_num_format}
\alias{xl_protection}
\title{Cell formatting groups}
\usage{
xl_font(
  bold = NA,
  italic = NA,
  color = NA,
  size = NA,
  name = NA,
  underline = NA,
  strikeout = NA,
  script = NA,
  family = NA,
  charset = NA,
  outline = NA,
  shadow = NA,
  condense = NA,
  extend = NA,
  scheme = NA,
  theme = NA,
  color_indexed = NA,
  font_only = NA
)

xl_fill(background = NA, foreground = NA, pattern = NA, transparency = NA)

xl_border(
  all = NA,
  left = NA,
  right = NA,
  top = NA,
  bottom = NA,
  color = NA,
  left_color = NA,
  right_color = NA,
  top_color = NA,
  bottom_color = NA,
  diagonal = NA,
  diagonal_style = NA,
  diagonal_color = NA,
  transparency = NA
)

xl_align(
  horizontal = NA,
  vertical = NA,
  wrap = NA,
  rotation = NA,
  indent = NA,
  shrink = NA,
  reading_order = NA
)

xl_num_format(format = NA, index = NA)

xl_protection(locked = NA, hidden = NA)
}
\arguments{
\item{bold, italic, strikeout, outline, shadow, condense, extend, font_only}{Logical
font flags.}

\item{color, background, foreground, left_color, right_color, top_color, bottom_color, diagonal_color}{A color: an R color name, a hex string, or an integer (see [xl_color]).}

\item{size}{Font size in points (1--409).}

\item{name}{Font name, e.g. `"Calibri"`.}

\item{underline}{One of `"none"`, `"single"`, `"double"`,
`"single-accounting"`, `"double-accounting"`.}

\item{script}{One of `"super"`, `"sub"`.}

\item{family, charset, theme, color_indexed}{Advanced integer font properties
(rarely needed).}

\item{scheme}{Font scheme string (advanced).}

\item{pattern}{Fill pattern, e.g. `"solid"`, `"light-gray"` (18 choices).
When `background` is supplied and `pattern` is unset, a `"solid"` pattern
is assumed.}

\item{transparency}{Percentage transparency, 0--100.  **Charts only**: Excel
has no transparency for a cell's fill or border, so this is ignored
everywhere except a chart's line and fill (see [xl_chart()]).}

\item{all}{Border style applied to all four sides at once (one of `"none"`,
`"thin"`, `"medium"`, `"dashed"`, `"dotted"`, `"thick"`, `"double"`,
`"hair"`, `"medium-dashed"`, `"dash-dot"`, `"medium-dash-dot"`,
`"dash-dot-dot"`, `"medium-dash-dot-dot"`, `"slant-dash-dot"`).}

\item{left, right, top, bottom}{Per-side border styles (override `all`).}

\item{diagonal}{Diagonal border direction: `"up"`, `"down"`, `"up-down"`.}

\item{diagonal_style}{Diagonal border style (same choices as `all`).}

\item{horizontal}{Horizontal alignment: `"left"`, `"center"`, `"right"`,
`"fill"`, `"justify"`, `"center-across"`, `"distributed"`.}

\item{vertical}{Vertical alignment: `"top"`, `"bottom"`, `"center"`,
`"justify"`, `"distributed"`.}

\item{wrap}{Logical; wrap text in the cell.}

\item{rotation}{Text rotation in degrees (-90..90, or 270).}

\item{indent}{Integer indentation level.}

\item{shrink}{Logical; shrink text to fit.}

\item{reading_order}{One of `"default"`, `"ltr"`, `"rtl"`.}

\item{format}{A number-format string, e.g. `"#,##0.00"`, `"0%"`,
`"yyyy-mm-dd"`.}

\item{index}{An Excel built-in number-format index (alternative to
`format`).}

\item{locked}{Logical; whether the cell is locked (Excel's default is
`TRUE`).  Only takes effect when the worksheet is protected.  `FALSE`
unlocks the cell.}

\item{hidden}{Logical; hide the cell's formula.}
}
\value{
An [xl_format] object.
}
\description{
These constructors build [xl_format] objects, each populating one group of
Excel cell-formatting properties.  Every property defaults to `NA`, meaning
"leave unset"; unset properties are simply not written.  Enum-like arguments
take lowercase strings and are validated against a fixed set of choices.

Each constructor returns a full `xl_format`, so a single group can be used on
its own (`xl_cell_general(1, format = xl_font(bold = TRUE))`), and groups can
be combined with `+` (see [xl_format]).
}
\examples{
xl_font(bold = TRUE, color = "navy", size = 12)
xl_fill(background = "#FFF2CC")
xl_border(all = "thin", color = "gray")
xl_align(horizontal = "center", vertical = "top", wrap = TRUE)
xl_num_format("#,##0.00")
xl_protection(locked = FALSE)
}
\seealso{
[xl_format], [xl_color]

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