Skip to contents

write_report_xlsx writes the given data to the specified folder with the given filename in Excel (.xlsx) format.

Usage

write_report_xlsx(data, filename, folder)

Arguments

data

List. Named list of dataframes. The name will be used as the sheet name.

filename

String. Report filename.

folder

Filepath. Report destination folder.

Value

NULL.

Examples

# Create sample data with multiple sheets
r_data1 <- data.frame(
  Disease = c("Measles", "Chickenpox"),
  Counts = c(20, 43)
)
r_data2 <- data.frame(
  Disease = c("Measles", "Chickenpox"),
  Rate = c(10.5, 22.7)
)
r_xl <- list(
  counts = r_data1,
  rates = r_data2
)

# Write to temporary directory
write_report_xlsx(r_xl, "report.xlsx", tempdir())