I'm using django-pyexcel
to export data from the website, but when I go to the export URL I get the error:
Exception Type: IOError
Exception Value: No content, file name. Nothing is given
The code to export the data was copied from the example given in the documentation:
return excel.make_response_from_a_table(Question, 'xls', file_name="sheet")
The problem turned out to be the file format used, xls
in this case.
I had only installed the xlsx
(pyexcel-xlsx
) processor so it did not know how to handle the xls
file format.
The exception message could have been a bit better as I spent ages trying to figure out if there was a problem with the filename I'd supplied.
I had the same problem using Flask app. Try installing the following requirements:
numpy==1.21.0
openpyxl==3.0.7
pandas==1.3.0
pyexcel-xlsx==0.6.0
XlsxWriter==1.4.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With