Use A Temporary File (StringIO) for Pandas's to_csv - Python Flask27 Mar 2014 This link helped me use a temporary file for an excel export in flask (using pandas): https://coderwall.com/p/nwbuhq