Saves multiple data frames to a single Excel file.

save_data_xls(data_names, path, col_names = TRUE, format_headers = TRUE)

Arguments

data_names

data frame or named list of data frames

path

Path, including filename, for Excel file.

col_names

Logical to include column names. Default = TRUE

format_headers

Logical to format headers (bold and centered). Default = TRUE

Value

a saved Excel file with named data saved to individual worksheets.

Details

Saves multiple data frames to a multiple worksheets in a single Excel file.

The data must be loaded into R.

The `writexl` package is used so that Java is not necessary.

Examples

# Data (Test Lake)
data         <- laketest


path <- tempfile(fileext = ".xlsx")
data_names <- list


# Save to Excel
save_data_xls(path
              , data_names
              , col_names = TRUE
              , format_headers = TRUE)
#> Error in loadNamespace(x): there is no package called ‘writexl’