[Zope] Zope and Excel
Paul Browning
paul.browning@bristol.ac.uk
Wed, 08 Jan 2003 05:39:57 -0000
--On 07 January 2003 10:54 +0000 Miche=E1l Healy =
<michael.healy@engitech.ie>=20
wrote:
> Hi all,
>
> I want to create a report or spreadsheet in MS Excel and populate it from
> Zope. Can anyone tell me if there is a product for Zope that will help,
> or should I just look for a generic python script that does it and use
> that.
>
> If anyone has a working example, I'd appreciate code samples and anything
> else you can provide.
It ain't pretty but the following DTML Document does the job for me (and
forces Excel to open):
-------------
Content-type: application/vnd.ms-excel
SURNAME<dtml-var "_.chr(9)">FIRST_NAME<dtml-var=20
"_.chr(9)">STUDENT_NUMBER<dtml-var "_.chr(9)">EMAIL_NAME<dtml-var=20
"_.chr(9)">
<dtml-in expr=3D"students_by_unit_code(unit_code=3D_['unit_code'])">
<dtml-var SURNAME><dtml-var "_.chr(9)"><dtml-var FIRST_NAME><dtml-var=20
"_.chr(9)"><dtml-var STUDENT_NUMBER>q<dtml-var "_.chr(9)"><dtml-var=20
EMAIL_NAME><dtml-var "_.chr(9)">
</dtml-in>
------------
students_by_unit_code being a SQL Method.
Paul
--
The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
E-mail: paul.browning@bristol.ac.uk URL: http://www.bris.ac.uk/