Readxl provides a good solution to iterate over multiple sheets and name those sheets, which works great.
https://readxl.tidyverse.org/articles/articles/readxl-workflows.html
path <- readxl_example("datasets.xlsx")
path %>%
excel_sheets() %>%
set_names() %>%
map(read_excel, path = path)
However I need to pass additional arguments to read_excel..such as below being the desired output.
read_excel("datasets.xlsx",col_names = FALSE, skip = 1)
Solutions I tried
path <- readxl_example("datasets.xlsx")
path %>%
excel_sheets() %>%
set_names() %>%
map(read_excel(col_names = FALSE, skip = 1), path = path)
and
read_excel_func <- function(y){
readxl::read_excel(y, col_names = FALSE, skip = 1)
}
path <- readxl_example("datasets.xlsx")
path %>%
excel_sheets() %>%
set_names() %>%
map(read_excel_func, path = path)