Another option which I use, which is prettier to the user but uglier for the programmer, is to use an ExtMethod and pipe your data through a Spreadsheet::WriteExcel Perl script. This Perl module allows you to do anything that you could do within Excel, including formatting, cell merging, resizing the width and height of columns/rows, etc. If only someone sufficiently proficient in Perl and Python could port it to Python! -----Original Message----- From: paul.browning@bristol.ac.uk [mailto:paul.browning@bristol.ac.uk] Sent: Wednesday, 8 January 2003 4:40 PM To: zope@zope.org Cc: michael.healy@engitech.ie Subject: Re: [Zope] Zope and Excel --On 07 January 2003 10:54 +0000 Micheál Healy <michael.healy@engitech.ie> 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 "_.chr(9)">STUDENT_NUMBER<dtml-var "_.chr(9)">EMAIL_NAME<dtml-var "_.chr(9)"> <dtml-in expr="students_by_unit_code(unit_code=_['unit_code'])"> <dtml-var SURNAME><dtml-var "_.chr(9)"><dtml-var FIRST_NAME><dtml-var "_.chr(9)"><dtml-var STUDENT_NUMBER>q<dtml-var "_.chr(9)"><dtml-var 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/ _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
pskipworth@touchcorp.com