title: Getting error message when loading an .xlsx file?
body: <p>I am not sure why this is happening. I am trying to load about 180 .xlsx files using the xlsx package. I have run though code that i thought would load all the files (different names but same format) and extract 3 rows from each file. See below:</p>
  
  <pre><code>f &lt;- list.files("./") 
  
  dat = lapply(f, function(i){
       x = read.xlsx(i, sheetIndex=1, sheetName=NULL, startRow=127,
       endRow=130, as.data.frame=TRUE, header=T)
  
  # You may want to add a column to say which file they're from
  
       x$file = i
  
  # Return your data
  
       x
       })
  </code></pre>
  
  <p>I get the following error</p>
  
  <blockquote>
    <p>Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : 
    java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream </p>
  </blockquote>
  
  <p>I have updated JAVA on my MAC but that didnt work.</p>
  
  <p>Any suggestions anyone?</p>
  
  <p>Anoop</p>