title: xlsxwriter error: AttributeError: 'Workbook' object has no attribute 'add_format'
body: <p>I'm doing some simple conditional formatting using xlsxwriter but I am getting this error when I run the code below.</p>
  
  <pre><code>AttributeError: 'Workbook' object has no attribute 'add_format'
  </code></pre>
  
  <p>I have updated xlsxwriter and looked at a lot of questions on SO and documentation but nothing has worked yet.</p>
  
  <p>This is my code:</p>
  
  <pre><code>workbook = load_workbook(input_excel_filename)
  writer = pd.ExcelWriter(input_excel_filename, engine="xlsxwriter")
  writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
  
  trends_sheet = writer.sheets["Trends"]
  slight_increase = writer.book.add_format({"bg_color":"#d3e6d5"})
  trends_sheet.conditional_format("E:E", {"type":"cell", "criteria":"==", "value":"Slight Increase", "format":slight_increase})
  </code></pre>