I do something similar with engineering data where I separate the data
into tabs for different temperatures and data types and send the
spreadsheets back to the client.  I use a module called xlwt to do all
of the spreadsheet formatting in Pylons before I send the data back
using a CStringIO output buffer. This seems to work whether the user
is on Windows or Linux at opening either Excel or Open Office.

The response headers are like this:
response.headers['Content-Type'] = 'application/vnd.ms-excel'
response.headers['Content-Disposition'] = 'attachment;
filename="spreadsheet.xls"'

And then the output buffer is returned using:
return output_string

Hope this helps.
- Eric

On Apr 15, 3:22 am, Michael Brickenstein <[email protected]> wrote:
> Am 15.04.2010 um 11:18 schrieb Krishnakant Mane:
>
> > Good, so now I am left to just hack out the ods related problem.
> > It will be great if I can send the spreadsheet across to browser.  The 
> > browser may inturn open calc and display the spreadsheet.
>
> For spreadsheets the python standard library include csv reading and writing 
> support.
> Actually, the RUM CRUD application also includes also a csv output format.
>
> As far I know, there exists also packages for writing excel.
> But I did not use that.
> Cheers,
> Michael
>
>
>
> > Happy hacking.
>
> > Krishnakant.
>
> > On Thursday 15 April 2010 02:14 PM, Michael Brickenstein wrote:
> >> We also use reportlab in RUM to generate pdf's
> >> with landscape tables of data.
> >> No complaints.
> >> It is a general pdf framework, so not always "supereasy" (was a little
> >> bit difficult to
> >> find out, how to register a specific font for bold text), but it also
> >> seems quite mature.
> >> Cheers,
> >> Michael
>
> >> On 15 Apr., 02:20, Mike Orr<[email protected]>  wrote:
>
> >>> By the way, my client is using ReportLab to generate PDFs, the same as
> >>> the other developer was.
>
> >>> --
> >>> Mike Orr<[email protected]>
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "pylons-discuss" 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 
> > athttp://groups.google.com/group/pylons-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to