write_xlsx

0th

Percentile

Export to xlsx

Writes a data frame to an xlsx file. To create an xlsx with (multiple) named sheets, simply set x to a named list of data frames.

Usage
write_xlsx(
  x,
  path = tempfile(fileext = ".xlsx"),
  col_names = TRUE,
  format_headers = TRUE
)
Arguments
x

data frame or named list of data frames that will be sheets in the xlsx

path

a file name to write to

col_names

write column names at the top of the file?

format_headers

make the col_names in the xlsx centered and bold

Details

Currently supports strings, numbers, booleans and dates. Formatting options may be added in future versions.

Aliases
  • write_xlsx
  • writexl
Examples
# NOT RUN {
# Roundtrip example with single excel sheet named 'mysheet'
tmp <- write_xlsx(list(mysheet = iris))
readxl::read_xlsx(tmp)
# }
Documentation reproduced from package writexl, version 1.2, License: BSD_2_clause + file LICENSE

Community examples

Looks like there are no examples yet.