[EMAIL PROTECTED] escreveu: > > > def ficheiroExcel(request): > > > from pyExcelerator import * > > > > > > response = HttpResponse(mimetype='application/vnd.ms-excel') > > > response['Content-Disposition'] = 'attachment; > > > filename=somefilename.xls' > > > > > > w = Workbook(HttpResponse) <-- this gives me an > > > error > > > > You haven't really given us a lot to work with here. I did a Google > > search for pyExcelerator and tracked down it's sourceforge page, but > > could not find any online documentation. And you haven't said what the > > error is (although that wouldn't help me in this case, since I don't > > know anything about pyExcelerator, it might help somebody who was > > familiar with the package help you). > The project resides at http://sourceforge.net/projects/pyexcelerator > When downloaded, there are some scripts at the examples directory that > help. > But I won't mind to use another excel files generator from python if an > example is provided, since I haven't started to prepare file with > pyExcelerator. > > When used as standalone, w = Workbook() creates an instance of the > class Workbook. > > Then a sheet with a formula can be added: > ws = w.add_sheet('inicio') > ws.write(0, 0, Formula("-(1+1)")) > > The file would be saved like this: > w.save("some_file_name") > > > > > Still, a few thoughts: What is pyExcelerator.Workbook() expecting to be > > passed as a parameter? HttpResponse is a reasonably specialised Django > > class, so I would not be too surprised it doesn't act as a proxy for > > whatever is expected by Workbook(). Also, you are passing in the class > > itself (HttpResponse), rather than an instance of the class (response). > > I'm not sure that is going to do what you want. > > > > Malcolm > > That was only one of the attempts made to solve my problem, with no > success. > > If you or somebody could present me an example using pyExcelerator, > pyXLWriter or other I'd be apreciated. >
I solved this with pyXLWriter. Thank you. Luis P. Mendes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users -~----------~----~----~----~------~----~------~--~---

