--On 17. November 2005 10:51:32 -0500 Kate Legere <klegere@kfpl.ca> wrote:
So this probably has a simple answer but if someone could direct me it would save lots of time ...
I have a python script that gets called from a dtml method and returns the information requested from a mySql database and opens it as an excel file. I'd like it also to save the file (it can safely overwrite the existing file) ... how do I do this?
What means you would like to save the file? As soon as the file is on the client side there is *nothing* you can do from the Zope side. -aj
---the python script has
request = container.REQUEST RESPONSE = request.RESPONSE
table_example = <-- html table formatting tags and python code to get the info from the database -->
RESPONSE.setHeader("Content-type","application/vnd.ms-excel") RESPONSE.setHeader("Content-disposition","attachment;filename=statsSpread she et.xls")
return table_example
-----------------
Kate
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )