#' multi_excel
#'
#' Read multiple sheets from an excel file
#' @param file Excel file to be read
#' @return A tibble containing data from the excel file
#' @import assertthat
#' @import readxl
#' @examples
#' multi_excel("~/Downloads/abc.xlsx")
#' @export
multi_excel <- function(file) {
assert_that(is.readable(file))
assert_that(has_extension(file, "xls") || has_extension(file, "xlsx"))
all_sheets <- excel_sheets(file)
result <- lapply(all_sheets, function(sheet) {
read_excel(file, sheet = sheet)
})
return(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.