@
sylvos ```python
wb = xlwt.Workbook()
ws = wb.add_sheet('预算报表')
row = [0]
def write_line(line, *args):
for index, text in enumerate(line):
if not text:
continue
ws.write(row[0], index, text, *args)
row[0] = row[0] + 1
write_line([ '… blablabla …' ])
for archive in archives:
write_line([
'… blablabla …'
])
excel = io.BytesIO()
wb.save(excel)
excel = excel.getvalue()
self.set_header('Content-Type', 'application/
vnd.ms-excel')
self.set_header('Content-Length', len(excel))
self.write(excel)
```