Hi,
I am trying to create Excel file using pyExcelerator but my problem is
I am not able
to attach file to response.

code :
    workbook = Workbook()
    worksheet = workbook.add_sheet('My Test Sheet')

    worksheet.write(0,0, 'Company', font_style('left', 1, 'red'))
    worksheet.write(1,1, 'Hello World!', font_style('left', 1,
'black'))
    worksheet.write(1,0, 'Hello World!', font_style('left', 1, 'red'))

    response = HttpResponse( mimetype='application/vnd.ms-excel')
    response['Content-Disposition'] = 'attachment;
filename=output.xls'
    workbook.save('output.xls')

   return response.

I am able to generate output.xl file but without any data.
Can anyone help me out
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to