On a django site, I want to generate an excel file based on some data in the database.
I\'m thinking of using xlwt, but it only has a method to save the data to a fi
You can save your XLS file to a StringIO object, which is file-like.
You can return the StringIO object's getvalue() in the response. Be sure to add headers to mark it as a downloadable spreadsheet.
getvalue()