I want to create a dynamic Excel file as requested from Django. The pyExcelerator library does this, but I did not find any way to use the contents of the Excel file without creating a temporary Excel file on the server side, reading it, using its contents and deleting it.
The problem is that pyExcelerator only for extracting the contents of an Excel file saves it via:
workbook = pyExcelerator.Workbook()
workbook.save("tmp_filename")
And then read the contents of the temporary file. I cannot use the standard tempfile file because it does not accept the file, just the file name. How can I make sure that the file name is unique and that the file is deleted after using it?
source
share