我正在尝试从 django 的内存中读取一个 excel 文件,但不断收到以下错误:
NotImplementedError:formatting_info=True 尚未实现
这是代码:
from pyexcel_xls import get_data
def processdocument(file):
print("file", file)
data = get_data(file)
return 1
当我从本地存储中读取相同的文件时,它工作得很好
data = get_data(r"C:\Users\Rahul Sharma\Downloads\Sample PFEP (2).xlsx")
我想到了一个可行的解决方案,即将上传的文件临时保存在 django os 中,然后将其 URL 传递给函数。我可以这样做吗?