fix: add 'floatfmt' when extract number from excel ( #20153 ) (#20193)

Co-authored-by: wangheyang <wangheyang@corp.netease.com>
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
Heyang Wang
2025-05-26 16:41:57 +08:00
committed by GitHub
parent 38e48c0c40
commit b9b5d43dc6
2 changed files with 180 additions and 1 deletions

View File

@@ -366,7 +366,7 @@ def _extract_text_from_excel(file_content: bytes) -> str:
df = excel_file.parse(sheet_name=sheet_name)
df.dropna(how="all", inplace=True)
# Create Markdown table two times to separate tables with a newline
markdown_table += df.to_markdown(index=False) + "\n\n"
markdown_table += df.to_markdown(index=False, floatfmt="") + "\n\n"
except Exception as e:
continue
return markdown_table