Using xlwt I have created an Excel sheet that with Django I would like to email as an attachment.
response = HttpResponse(mimetype='application/ms-excel')
response['Content-Disposition'] = 'attachment; filename='Report.xls'
book = xlwt.Workbook()
sheet = book.add_sheet("Core Listings")
book.save(response)
return response
I am using Django EmailMessage
to send out emails.