环境:
python3.6
Django1.81
xwlt1 1.83
解放办法:
引用包:
from django.utils.http import urlquote
filename = u"员工信息表" filename = urlquote(filename) response = HttpResponse(content_type='application/vnd.ms-excel') response['Content-Disposition'] = 'attachment; filename=%s'%(filename)+ time.strftime('%Y%m%d', time.localtime(time.time())) + '.xls'