I'm sure any longtime users of xlrd already know this, but I figured
I'd put it out there, since I had trouble tracking it down.
xlrd's open_workbook function takes a file_contents argument. If you
set that to file_contents=uploaded_file.read(), you can pass .xls
sheets directly to it from a Dja
Hey All,
Can anyone tell me how to read a Djano UploadedFile .xls file with
xlrd without resorting to explicitly saving the file to the hard
drive?
If I attempt to pass my_file.read() directly to xlrd, the error I get
is:
file() argument 1 must be (encoded string without NULL bytes), not str
B
2 matches
Mail list logo