title: how to write to a new cell in python using openpyxl
body: <p>I wrote code which opens an excel file and iterates through each row and passes the value to another function.</p>
  
  <pre><code>import openpyxl
  wb = load_workbook(filename='C:\Users\xxxxx')
  for ws in wb.worksheets:
      for row in ws.rows:
          print row
          x1=ucr(row[0].value)
          row[1].value=x1  #  i am having error at this point
  </code></pre>
  
  <p>I am getting the following error when I tried to run the file.</p>
  
  <pre><code>TypeError: IndexError: tuple index out of range
  </code></pre>
  
  <p>Can I write the returned value <code>x1</code> to the <code>row[1]</code> column. Is it possible to write to excel (i.e using <code>row[1]</code>) instead of accessing single cells like <code>ws.['c1']=x1</code></p>