R/multi_excel.R

Defines functions multi_excel

Documented in multi_excel

#' Title
#'
#' @param file This is the file from which we want to import the sheets
#'
#' @return a list
#' @import readxl
#' @importFrom readxl excel_sheets
#' @export
#'
#' @examples
#' \dontrun{
#' multi_excel('jeux.xlsx')
#' }
multi_excel <- function(file) {
  all_sheets <- readxl::excel_sheets(file)
  result <- lapply(all_sheets, function(sheet) {
    readxl::read_excel(file, sheet = sheet)
  })
  return(result)
}
margauxwehr/packageexo documentation built on May 29, 2019, 3:44 a.m.