wb <- wb_workbook()
wb$add_worksheet("Sheet 1")
wb$add_worksheet("Sheet 2")
wb$add_worksheet("Sheet 3")
wb$add_data(1, iris)
wb$add_filter(1, row = 1, cols = seq_along(iris))
## Equivalently
wb$add_data(2, x = iris, withFilter = TRUE)
## Similarly
wb$add_data_table(3, iris)
Run the code above in your browser using DataLab