title: Django: openpyxl saving workbook as attachment
body: <p>Hi I have a quick question. I didn't find answer in internet maybe someone of you can help me.</p>
  
  <p>So i want to save workbook as attachment but I don't know how lets see an example :</p>
  
  <pre><code>    from openpyxl import Workbook
      from openpyxl.cell import get_column_letter
      wb = Workbook(encoding='utf-8')
      dest_filename = 'file.xlsx'
      ws = wb.worksheets[0]
      ws.title = "range names"
      for col_idx in xrange(1, 40):
          col = get_column_letter(col_idx)
          for row in xrange(1, 600):
              ws.cell('%s%s'%(col, row)).value = '%s%s' % (col, row)
      ws = wb.create_sheet()
      ws.title = 'Pi'
      ws.cell('F5').value = 3.14
  </code></pre>
  
  <p>Then I tried :</p>
  
  <pre><code>response = HttpResponse(wb, content_type='application/vnd.ms-excel')
  response['Content-Disposition'] = 'attachment; filename="foo.xls"'
  return response
  </code></pre>
  
  <p>It's returning xlsx file indeed but in file there is only object adres not the content of file:</p>
  
  <pre><code>&lt;openpyxl.workbook.Workbook object at 0x00000000042806D8&gt;
  </code></pre>
  
  <p>Can someone help ?</p>