On Nov 4, 2:50 pm, Rotem Tamir <[email protected]> wrote:
> The way I'm using is this:
>
> I have a template file with something like
>
> ${grid(data)}
>
> where grid is a DataGrid object and data is a list of database records
> from SqlAlchemy
>
> To serve this I'm doing:
>
> @expose('project.templates.excel',content_type="application/vnd.ms-
> excel")
>
> this way the browser thinks it's receiving a true MS-Excel file but
> actualy receiving an html table (from DataGrid) - turns out excel
> proceses this just fine!
>
> good luck
>
> Rotem
>

Thanks Rotem!  This is very cool.  I'm not sure it solves my problem
exactly, but it might lead to a working solution.

I never thought of using the template system to create the excel
file...I would have just made a tab delimited text file in one of the
controller methods.

Need to think more about how to use this strategy...

~Sean

-- 
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