[Zope] probably a simple answer...

Kate Legere klegere at kfpl.ca
Thu Nov 17 10:51:32 EST 2005


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?


---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=statsSpreadshe
et.xls")


return table_example

-----------------

Kate



More information about the Zope mailing list