map_wb()
takes a list and returns a list of wbWorkbook
objects.
properties
is recycled to match the length of the input x.
Arguments
- x
A data frame, a list of data frames, a file path for an Excel file, or a
wbWorkbook
object. AwbWorkbook
is returned "as is" ignoring all other parameters. A file path is loaded to a data frame usingopenxlsx2::wb_to_df()
.- ...
Arguments passed on to
as_wb
sheet_names
Optional character vector of worksheet names.
title,subject,category,keywords
Additional arguments passed to
openxlsx2::wb_workbook()
.creator
Creator of the workbook (your name). Defaults to login username or
options("openxlsx2.creator")
if set.datetime_created
The time of the workbook is created
theme
Optional theme identified by string or number. See Details for options.
call
The execution environment of a currently running function, e.g.
caller_env()
. The function will be mentioned in error messages as the source of the error. See thecall
argument ofabort()
for more information.
- properties
A named list (typically from
openxlsx2::wb_get_properties()
) used to set new workbook properties for any values set toNULL
.datetime_created
defaults toSys.time()
so must be set toNULL
to inherit value fromproperties
.- .progress
Whether to show a progress bar. Use
TRUE
to turn on a basic progress bar, use a string to give it a name, or see progress_bars for more details.
Examples
map_wb(list(mtcars[1:3, ], mtcars[4:6, ]))
#> [[1]]
#> A Workbook object.
#>
#> Worksheets:
#> Sheets: Sheet 1
#> Write order: 1
#> [[2]]
#> A Workbook object.
#>
#> Worksheets:
#> Sheets: Sheet 1
#> Write order: 1