Updated answer based on readxl package.
library("readxl") #function to read all sheets of a workbook read_excel_allsheets <- function(filename) { sheets <- readxl::excel_sheets(filename) x <- lapply(sheets, function(X) readxl::read_excel(filename, sheet = X)) names(x) <- sheets x } sheetnames <- read_excel_allsheets("excelFile.xlsx") names(sheetnames)
Andrew Borst
source share