title: Creating matrix by reading data from Excel
body: <p>I'm trying to create a data matrix from an XML file using xlrd. Below is the XML data and my attempt:</p>
  
  <p><img src="https://i.stack.imgur.com/nqBGP.jpg" alt="enter image description here"></p>
  
  <pre><code>import xlrd
  file_loc="C:\\Users\\xxxx\\Documents\\test1.xlsx"
  wkb=xlrd.open_workbook(file_loc)
  sheet=wkb.sheet_by_index(0)
  
  _maxtrix=[]
  for col in range (sheet.ncols):
      for row in range (sheet.nrows):
          _matrix.append(sheet.cell_value(row,col))
  print _matrix
  </code></pre>
  
  <p>My output:</p>
  
  <pre><code>[1.0, 2.0, 3.0, 4.0, 2.0, 3.0, 4.0, 5.0, 3.0, 4.0, 5.0, 6.0, 4.0, 5.0, 6.0, 7.0]
  </code></pre>
  
  <p>Desired output: </p>
  
  <pre><code>[[1,2,3,4],
  [2,3,4,5],
  [3,4,5,6],
  [4,5,6,7]]
  </code></pre>
  
  <p>Any ideas on how to get the desired output?</p>