title: How to read Multiple Xlsx files having multiple work books in python dataframe using a loop
body: <p>I have 15 xlsx files each having multiple worksheets. I want to dynamically loop it in such a way that all the worksheets and workbooks are read inside a single data frame.</p>
  
  <p>I had tried using pd.read_excel in the following way</p>
  
  <pre class="lang-py prettyprint-override"><code>
  filenames = glob.glob("*.xlsx")
  dfList=[]
  colnames =['dummy','dummy1','dummy2']
  for a in filenames:
      df=pd.read_excel(a, sheet_name=None, header = None, encoding = "ISO-8859-1")
      dfList.append(df)
  
  df= pd.concat(dfList, axis=0, ignore_index= True)
  df.columns= colnames
  </code></pre>
  
  <p>The error I get when i run the pd.concat is </p>
  
  <pre><code>TypeError: cannot concatenate object of type "&lt;class 'collections.OrderedDict'&gt;"; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid
  </code></pre>
  
  <p>and also tried </p>
  
  <pre class="lang-py prettyprint-override"><code>for a in filenames:
      df=[pd.read_excel(a, sheet_name=None, header = None, encoding = "ISO-8859-1").values()]
      dfList.append(df)
  </code></pre>
  
  <p>i get the following error</p>
  
  <pre><code>TypeError: cannot concatenate object of type "&lt;class 'collections.OrderedDict'&gt;"; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid
  </code></pre>