#NEWLINE# def download( self ) : #NEWLINE# #INDENT# buffer = StringIO ( ) #NEWLINE# self . write ( ) #NEWLINE# self . workbook . save ( self ) #NEWLINE# buffer . seek ( 0 ) #NEWLINE# e = exc . HTTPOk ( ) #NEWLINE# e . content_type = 'application/vnd.ms-excel' #NEWLINE# e . content_disposition = ( 'attachment;filename=%s.xls' % self . filename ) #NEWLINE# e . body = buffer . getvalue ( ) #NEWLINE# raise e