質問: 'attachment; filename={}.xlsx'.format(filename) wb.save(response) return response ```
回答: 過去に下記の通り実装しましたが、どうでしょうか。 ``` content_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' filename = 'your-file-name' response = HttpResponse(output, content_type=content_type) response['Content-Disposition'] = 'attachment; filename=filename' return response ```