Skip to navigation
Download a in memory created excel file from tornado
28.03.16
import openpyxl wb = openpyxl.Workbook() ws = wb.active ws['A1'] = 'hello' f2=io.BytesIO() wb.save(f2) self.set_header('Content-Type', 'application/vnd.ms-excel') self.set_header('Content-Disposition', 'attachment; filename='+ xfile + '.xlsx') self.write(f2.getvalue())
https://pypi.python.org/pypi/openpyxl
Reply
Anonymous
Information Epoch 1746898413
Small is beautiful.
Home
Notebook
Contact us