[Zope] probably a simple answer...

Andreas Jung lists at andreas-jung.com
Thu Nov 17 11:36:20 EST 2005



--On 17. November 2005 10:51:32 -0500 Kate Legere <klegere at 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 at 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 )



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051117/9b54204c/attachment.bin


More information about the Zope mailing list