Say Dave, is xlwt included into current w2p version? Or I need to add
the library by myself?



On 22 июл, 05:05, Dave <davidramsayreinh...@gmail.com> wrote:
> I added these two lines and its working now!
>
>     response.headers['Content-Disposition']='attachment;
> filename=test.xls'
>     response.headers['Content-Title']='test.xls'
>
> Dave
>
> On Jul 21, 4:48 pm, Dave <davidramsayreinh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I added it to default.py controller, so it is working as an action
> > there.
>
> > When i go to that URL  (.../default/excel_report), the file downloads
> > as "excel_report" with no extension.  I am testing using Mac OS, so
> > not sure if that matters.  The file is fine.  When i rename it with
> > the .xls extension it opens in my spreadsheet application.
>
> > Thanks,
> > Dave
>
> > On Jul 21, 1:51 pm, Joaquin Orbe <joaquino...@gmail.com> wrote:
>
> > > On Thu, Jul 21, 2011 at 3:40 PM, Dave <davidramsayreinh...@gmail.com> 
> > > wrote:
> > > > This works great, but when i download the file it is missing the 
> > > > extension.
> > > > Is there an easy way to add '.xls' to the file name?
>
> > > > Thanks,
> > > > Dave
>
> > > Hi Dave,
> > > how do you download the file? This method is an action in one controller, 
> > > ie:
>
> > >http://127.0.0.1:8000/myapp/printer/excel_report
>
> > > and the file is downloaded as XLS.
>
> > > Joaco.

Reply via email to