title: write a list to Excel, starting at a specific cell, with openpyxl
body: <p>I am trying to write a list of values to an Excel spreadsheet, starting at a specific cell.  The values will be written periodically and the new values will replace the existing values, so writing will always start in cell F2.  I have tried multiple versions that I found on SO and other sites but I keep getting various errors, most recently a KeyError = 0 for these efforts :</p>
  
  <pre><code>for rowNum in range(len(list)):
      ws.cell(row=rowNum+1, column=5).value = list[rowNum]
  
  for i in range(len(list)):
      ws['F' + r].value = list[i+1]
  </code></pre>
  
  <p>PLEASE help !  Many thanks in advance.</p>
  
  <p>Edit - I found the solution in "Automate the Boring Stuff with Python", chapter 12.  I converted my dataframe to a dictionary and then this worked :</p>
  
  <pre><code>for rowNum in range(2, ws.max_row):
      item = ws.cell(row=rowNum, column=1).value
      if item in new_dict:
          ws.cell(row=rowNum, column=5).value = new_dict[item]
  </code></pre>