title: How to read in multiple ".xlsx" files to R
body: <p>Having trouble trying to read in multiple .xlsx files to R from the same directory. I keep getting the following error.</p>
  
  <blockquote>
    <p>"Error in path.expand(file) : argument "file" is missing, with no default"</p>
  </blockquote>
  
  <p>My code is as follows.</p>
  
  <pre><code>require(.xlsx)
  Files=list.files(path="I:/Marcs_Discretinization_try_1/Attempt1/Actual     Data", pattern=".xlsx")
  sapply(Files, read.xlsx2(sheetIndex=8))
  </code></pre>
  
  <p>The output of object Files looks like this which seemingly does not have the attached path.</p>
  
  <pre><code> [1] "2015-B1-2OR.xlsx"    "2015-B1-OR10-B.xlsx" "2015-B1-OR10.xlsx"   "2015-B1-OR19.xlsx"   "2015-B2-OR19.xlsx"  
   [6] "2015-O1-2OR.xlsx"    "2015-O1-OR10-B.xlsx" "2015-O1-OR10.xlsx"   "2015-O2-2OR.xlsx"    "2015-O2-OR10-B.xlsx"
  [11] "2015-O2-OR10.xlsx"   "2015-X1-2OR.xlsx"    "2015-X1-OR10-B.xlsx" "2015-X1-OR10.xlsx"   "2015-X2-2OR.xlsx"   
  [16] "2015-X2-OR10-B.xlsx" "2015-X2-OR10.xlsx"  
  </code></pre>