title: How to use openpyxl to modify data in specific sheet in python
body: <p>I am currently using openpyxl library to modify data in excel. My excel has many sheets and I could do it for the first sheet. However, when I was trying to modify the another one, it doesn't work and will destroy the file(I cant open the excel again.)</p>
  
  <p>Here is how I do for first sheet,</p>
  
  <pre><code>from openpyxl import load_workbook;
  book = load_workbook('Template.xlsx')
  sheet = book.active #active means get the first sheet
  sheet['A1']= 100
  book.save('Template.xlsx')
  </code></pre>
  
  <p>However, it doesn't work for another one</p>
  
  <pre><code>sheet2 = book.get_sheet_by_name('Table 2')
  sheet2['F9'] = 100
  book.save('Template.xlsx')
  </code></pre>
  
  <p>The AttributeError: 'NoneType' object has no attribute 'read'</p>
  
  <p>Explanation: get_sheet_by_name is not identical to get_sheet_name in the another question.</p>
  
  <p>Anyone knows how to fix this? Thanks a mil!</p>