title: return a created excel file with flask
body: <p>I am creating a excel file using openpyxl which I would like to return as a file download (so not saving locally).</p>
  
  <p>I can create the excel file fine and save it to disk. However, I cannot get this file to download.</p>
  
  <p>Attempt 1:</p>
  
  <pre><code>import flask_excel as excel
  
  ...
  
  create_excel_sheet(data) # internally save the sheet with name sheet.xlsx
  
  output = excel.make_response()
  output.headers["Content-Disposition"] = "attachment; filename=" + \
                                          'sheet.xlsx'
  output.headers["Content-type"] = "application/vnd.openxmlformats-\
  officedocument.spreadsheetml.sheet"
  
  return output
  </code></pre>
  
  <p>This returns an empty text file with name sheet.xlsx</p>
  
  <p>Attempt 2:
      wb = create_excel_sheet(data) # return openpyxl workbook</p>
  
  <pre><code>output = excel.make_response(wb)
  output.headers["Content-Disposition"] = "attachment; filename=" + \
                                          'sheet.xlsx'
  output.headers["Content-type"] = "application/vnd.openxmlformats-\
  officedocument.spreadsheetml.sheet"
  
  return output
  </code></pre>
  
  <p>I don't want to use pyexcel for the data as I need openpyxl to create a fancy excel sheet. Obviously if pyexcel and openpyxl communicated that would be fine.</p>
  
  <p>any thoughts?</p>
  
  <p>Cheers, Mike</p>