title: Loop for Read and Merge multiple excel sheets in r
body: <p>There are many posts about XLConnect and reading excel files in R with XLConnect like <a href="https://stackoverflow.com/questions/6894922/how-to-read-multiple-excel-sheets-in-r-programming">How to read multiple excel sheets in R programming?</a>, including rbind function, but no one answers this question:</p>
  
  <p>If i had multiple excel .xls files in a directory how can i use a loop for reading and merging
  each one in order?</p>
  
  <p>I have a directory so i do this:</p>
  
  <pre><code> setwd("C:/Users/usuario/Desktop")
    library(rjava)
    library(XLConnect)
  </code></pre>
  
  <p>That directory has 28 excel files named like this:</p>
  
  <pre><code> Bitacora_Metrocali_01_02_2014C
   Bitacora_Metrocali_02_02_2014C
           .    ...    ...
   Bitacora_Metrocali_28_02_2014C
  </code></pre>
  
  <p>So i need to merge them using the function:
        Merge(x,y,all=T) </p>
  
  <p>So it can add new columns to the dataframe. The thig is, i need a dataframe that starts
  merging the first wht the second,and then adding all the new sheets in order. All excel
  files of interest are in sheet 1. </p>
  
  <p>THX!</p>