def export_book(databook):
 wb = xlwt.Workbook(encoding='utf8')
 for (i, dset) in enumerate(databook._datasets):
  ws = wb.add_sheet((dset.title if dset.title else ('Sheet%s' % i)))
  dset_sheet(dset, ws)
 stream = BytesIO()
 wb.save(stream)
 return stream.getvalue()

def export_book ( databook ) : wb = xlwt . Workbook ( encoding = 'utf8' ) for ( i , dset ) in enumerate ( databook . _datasets ) : ws = wb . add_sheet ( ( dset . title if dset . title else ( 'Sheet%s' % i ) ) ) dset_sheet ( dset , ws ) stream = BytesIO ( ) wb . save ( stream ) return stream . getvalue ( )
html representation of a databook .