title: Cannot write to an excel AttributeError: 'Worksheet' object has no attribute 'write'
body: <p>I am trying to write text to an excel I am following this <a href="https://stackoverflow.com/questions/43537598/write-strings-text-and-pandas-dataframe-to-excel">post</a>.  This was working earlier but now it is not.  I get: </p>
  
  <p>Error:</p>
  
  <pre><code>line 122, in &lt;module&gt;
      worksheet.write(0, 11, 'HI')
  AttributeError: 'Worksheet' object has no attribute 'write'
  </code></pre>
  
  <p>df1</p>
  
  <pre><code>A  E
  c  d
  c  D
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>writer = pd.ExcelWriter("C:\\33.xlsx")
  df1.to_excel(writer, startrow=0, startcol=0, index = False)
  
  worksheet = writer.sheets['Sheet1']
  worksheet.write(0, 11, 'YO')
  worksheet.write(1, 11, 'HI')
  </code></pre>
  
  <p>I have tried also:</p>
  
  <pre><code>import xlrd
  import xlwt
  from xlutils.copy import copy
  import os.path
  rb = xlrd.open_workbook('C:\\13.xlsx',formatting_info=True)
  r_sheet = rb.sheet_by_index(0) 
  wb = copy(rb) 
  sheet = wb.get_sheet(0) 
  sheet.write(5,2,"string")
  wb.save('C:\\13.xlsx')
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>    with open(filename, "rb") as f:
  OSError: [Errno 22] Invalid argument: 'C:\\13.xlsx"'
  </code></pre>
  
  <p>How do I fix <code>AttributeError: 'Worksheet' object has no attribute 'write'</code></p>