From 3e7f1cea19323072e07c884dbce878932d0bc772 Mon Sep 17 00:00:00 2001 From: Simewu Date: Sat, 19 Apr 2025 08:33:12 -0400 Subject: [PATCH] Fix #183 Blank cells in .xlsx would return NaN in the markdown. --- .../markitdown/src/markitdown/converters/_xlsx_converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/markitdown/src/markitdown/converters/_xlsx_converter.py b/packages/markitdown/src/markitdown/converters/_xlsx_converter.py index 28f73a0..ee14f81 100644 --- a/packages/markitdown/src/markitdown/converters/_xlsx_converter.py +++ b/packages/markitdown/src/markitdown/converters/_xlsx_converter.py @@ -84,7 +84,7 @@ class XlsxConverter(DocumentConverter): md_content = "" for s in sheets: md_content += f"## {s}\n" - html_content = sheets[s].to_html(index=False) + html_content = sheets[s].to_html(index=False, na_rep="") md_content += ( self._html_converter.convert_string( html_content, **kwargs @@ -146,7 +146,7 @@ class XlsConverter(DocumentConverter): md_content = "" for s in sheets: md_content += f"## {s}\n" - html_content = sheets[s].to_html(index=False) + html_content = sheets[s].to_html(index=False, na_rep="") md_content += ( self._html_converter.convert_string( html_content, **kwargs