% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xl_workbook.R
\name{xl_workbook}
\alias{xl_workbook}
\title{A workbook: sheets plus workbook-level properties}
\usage{
xl_workbook(
  sheets,
  properties = xl_properties(),
  col_names = TRUE,
  format_headers = TRUE
)
}
\arguments{
\item{sheets}{A data frame, an [xl_sheet], or a (named) list of them.}

\item{properties}{An [xl_properties] object.}

\item{col_names}{write column names as the header row at the top of the sheet?}

\item{format_headers}{apply the workbook's header format to that header row?
The default header format is bold and centered; change it with
\code{\link{xl_properties}(header_format = )}.}
}
\value{
An `xl_workbook` object.
}
\description{
`xl_workbook()` binds one or more sheets (data frames or [xl_sheet]s) to a
set of [xl_properties].  It is the single place to attach workbook-level
formatting defaults and metadata.  When passed to [write_xlsx()], the
workbook's `col_names` and `format_headers` settings take precedence over
`write_xlsx()`'s own arguments.
}
\examples{
wb <- xl_workbook(
  list(Data = data.frame(x = 1:3)),
  properties = xl_properties(title = "Demo", author = "me")
)
tmp <- write_xlsx(wb)
}
\seealso{
[xl_properties], [xl_sheet], [write_xlsx]

Other workbook settings:
\code{\link[=write_xlsx]{write_xlsx()}},
\code{\link[=xl_properties]{xl_properties()}}
}
\concept{workbook settings}
