fixing xlsx file bug
This commit is contained in:
parent
52770c1bce
commit
a4420a5159
4
main.py
4
main.py
|
|
@ -245,9 +245,9 @@ async def upload_file(file: UploadFile = File(...), page: Optional[str] = Form("
|
||||||
print('ext', ext)
|
print('ext', ext)
|
||||||
|
|
||||||
if ext == ".csv":
|
if ext == ".csv":
|
||||||
df = read_csv(str(tmp_path), sheet)
|
|
||||||
elif ext == ".xlsx":
|
|
||||||
df = read_csv(str(tmp_path))
|
df = read_csv(str(tmp_path))
|
||||||
|
elif ext == ".xlsx":
|
||||||
|
df = read_csv(str(tmp_path), sheet)
|
||||||
elif ext == ".pdf":
|
elif ext == ".pdf":
|
||||||
tbl = read_pdf(tmp_path, page)
|
tbl = read_pdf(tmp_path, page)
|
||||||
if len(tbl) == 0:
|
if len(tbl) == 0:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user