title: how to fix TypeError: 'NoneType' object does not support item assignment
body: <blockquote>
    <p>Error</p>
    
    <p>File "", line 22, in  sheet['D3'] = '= SUM(G3:AZ3)'</p>
    
    <p>TypeError: 'NoneType' object does not support item assignment</p>
  </blockquote>
  
  <p>I tried several methods but none worked</p>
  
  <p>my code</p>
  
  <pre><code>import openpyxl module
  import openpyxl
  sb="lists.xls"
  
  wb = openpyxl.Workbook(sb)
  
  sheet = wb.active
  
  sheet['D3'] = '= SUM(G3:AZ3)'
  
  wb.save(sb)
  </code></pre>
  
  <p>I expect the code to run without error.</p>