title: Copying excel rows via python
body: <p>I basically have one excel file with has the following entries in a particular sheet</p>
  
  <pre><code>row[0][0]=hello
  
  row[1][0]=bye
  
  row[2][0]=hi
  </code></pre>
  
  <p>I want to copy these three rows into the number of rows present in the original sheet, so that the modified sheet has the following.</p>
  
  <pre><code>row[0][0]=hello
  
  row[1][0]=bye
  
  row[2][0]=hi
  
  row[3][0]=hello
  
  row[4][0]=bye
  
  row[5][0]=hi
  
  row[6][0]=hello
  
  row[7][0]=bye
  
  row[8][0]=hi
  </code></pre>
  
  <p>My code is the below.</p>
  
  <pre><code>from xlutils.copy import copy
  from xlrd import open_workbook
  import xlwt
  
  book=open_workbook("/Users/tusharbakaya/Desktop/test.xlsx")
  book1=copy(book)
  sheet=book.sheet_by_name('Sheet1')
  sheet1=book1.get_sheet(0)
  totalrows=sheet.nrows
  print totalrows
  for j in range(0,totalrows):
      for i in range(0,totalrows):
          row=sheet.cell_value(i,0)
          sheet1.write(j+totalrows,0,row)
          i+=1
      j+=totalrows
  book1.save("/Users/tusharbakaya/Desktop/test1.xls") 
  </code></pre>
  
  <p>However, I get the following output</p>
  
  <pre><code>row[0][0]=hello
  
  row[1][0]=bye
  
  row[2][0]=hi
  
  row[3][0]=hello
  
  row[4][0]=hello
  
  row[5][0]=hello
  
  row[6][0]=hello
  </code></pre>
  
  <p>Not sure why this is happening.</p>