pyexcel 导出错误 "No content, file name. Nothing is given"
pyexcel export error "No content, file name. Nothing is given"
我正在使用 django-pyexcel
从网站导出数据,但是当我去导出 URL 时出现错误:
Exception Type: IOError
Exception Value: No content, file name. Nothing is given
导出数据的代码是从文档中给出的 example 复制而来的:
return excel.make_response_from_a_table(Question, 'xls', file_name="sheet")
问题原来是使用的文件格式,xls
在这种情况下。
我只安装了 xlsx
(pyexcel-xlsx
) 处理器,所以它不知道如何处理 xls
文件格式。
异常消息本来可以更好一些,因为我花了很长时间试图弄清楚我提供的文件名是否有问题。
我在使用 Flask 应用程序时遇到了同样的问题。尝试安装以下要求:
numpy==1.21.0
openpyxl==3.0.7
pandas==1.3.0
pyexcel-xlsx==0.6.0
XlsxWriter==1.4.4
我正在使用 django-pyexcel
从网站导出数据,但是当我去导出 URL 时出现错误:
Exception Type: IOError
Exception Value: No content, file name. Nothing is given
导出数据的代码是从文档中给出的 example 复制而来的:
return excel.make_response_from_a_table(Question, 'xls', file_name="sheet")
问题原来是使用的文件格式,xls
在这种情况下。
我只安装了 xlsx
(pyexcel-xlsx
) 处理器,所以它不知道如何处理 xls
文件格式。
异常消息本来可以更好一些,因为我花了很长时间试图弄清楚我提供的文件名是否有问题。
我在使用 Flask 应用程序时遇到了同样的问题。尝试安装以下要求:
numpy==1.21.0
openpyxl==3.0.7
pandas==1.3.0
pyexcel-xlsx==0.6.0
XlsxWriter==1.4.4