title: Import excel workbook with multiple sheets
body: <p>I am looking to import an excel workbook into R with multiple sheets. However, I can't seem to quite make this work. The code I have been using is the following:</p>
  
  <pre><code>library(XLConnect)
  # Read Excel Sheet
  excel &lt;- loadWorkbook("C:/Users/rawlingsd/Downloads/17-18 Prem Stats.xlsx")
  # get sheet names
  sheet_names &lt;- getSheets(excel)
  names(sheet_names) &lt;- sheet_names
  # put sheets into a list of data frames
  sheet_list &lt;- lapply(sheet_names, function(.sheet){readWorksheet(object=excel, .sheet)})
  # limit sheet_list to sheets with at least 1 dimension 
  # sheet_list2 &lt;- sheet_list[sapply(sheet_list, function(x) dim(x)[1]) &gt; 0]
  # code to read in each excel worksheet as individual dataframes
  for (i in 1:length(sheet_list)){assign(paste0("2018df", i), as.data.frame(sheet_list[i]))}
  # define function to clean data in each data frame (updated based on your data)
  </code></pre>
  
  <p>If anyone could help me with my code or share a code that works for them, it would be greatly appreciated</p>