[Flask] Saving file to desktop

Mazzei, Stephen Andrew Stephen.Mazzei at asrcfederal.com
Fri Jul 22 09:25:20 EDT 2016


Good morning,

Right now I am currently working on a dataframe project. Part of this project is to save off the results to an excel document. My current code is

        bookname = request.form['bookname']
        sheetname = request.form['sheetname']
        writer = pd.ExcelWriter(bookname + '.xlsx')
        validation_df.to_excel(writer,sheetname)
        writer.save()


This is generating the correct report, but storing it local to machine. Can someone help guide me in the correct direction to either directly save the file to the user desktop instead of the local flask machine?

Thank you


---
Stephen A. Mazzei
Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965


________________________________

The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160722/17995d04/attachment-0001.html>


More information about the Flask mailing list