the_csv = "a,b,c\n1,2,3" # use module CSV to create this.

e.g. like this

    @expose(content_type='text/csv')
    def csv(self):
        stream = StringIO()
        writer = csv.writer(stream, dialect='excel')
        writer.writerow(['Spam'] * 5 + ['Baked Beans'])
        writer.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])
        output = stream.getvalue()
        stream.close()
        return output

For creating real Excel files you can use this:

http://www.python-excel.org

-- Christoph

--
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to