How do you read excel files with xlrd on Appengine

前端 未结 3 1316
旧时难觅i
旧时难觅i 2021-02-06 19:23

I am using xlrd in appengine. I use flask

I cant read the input file and it keeps on showing the same error message

the code is

def read_rows(inp         


        
3条回答
  •  终归单人心
    2021-02-06 19:40

    Use:

    wb = xlrd.open_workbook(file_contents=inputfile)
    

    The way you are invoking open_workbook expects what you're passing in to be a filename, not a Flask FileStorage object wrapping the actual file.

提交回复
热议问题