XLSX conversion loses Excel error values such as #DIV/0! and #REF!
I maintainer di solito rispondono entro 1 giorno
@sunxiuguo ci sta già lavorando.
Dal 21/10/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by tracing the built-in XLSX converter's pandas/openpyxl read path; the report shows the error value is lost during pandas' openpyxl cell conversion, before HTML or Markdown rendering. Use the reproduction in the issue to compare error-typed and text-typed cells and check the saved error tokens in the output. Done means each saved Excel error token is retained while a genuinely blank cell remains distinguishable; pull request #2732 is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The built-in XLSX converter replaces Excel error cells with NaN, losing which calculation failed. For example, #DIV/0!, #REF!, and #VALUE! all become indistinguishable from a blank cell. This affects saved error values; reproducing it does not require evaluating formulas.
Reproduced on current main at 69e208746aa5804087e9984d585eab21667e9b0f, using Python 3.12.15, pandas 3.0.6, openpyxl 3.1.5, and MarkItDown 0.1.8 on macOS:
import io
from openpyxl import Workbook, load_workbook
from markitdown import MarkItDown, StreamInfo
workbook = Workbook()
sheet = workbook.active
sheet.title = "Results"
sheet.append(["Case", "Result"])
sheet.append(["Valid value", 42])
for error in ("#DIV/0!", "#REF!", "#VALUE!", "#N/A", "#NUM!", "#NAME?", "#NULL!"):
sheet.append(["Error " + str(sheet.max_row), error])
sheet.append(["Blank", None])
source = io.BytesIO()
workbook.save(source)
workbook.close()
source.seek(0)
loaded = load_workbook(source, data_only=True)
assert loaded.active["B3"].value == "#DIV/0!"
assert loaded.active["B3"].data_type == "e"
loaded.close()
source.seek(0)
result = MarkItDown(enable_plugins=False).convert_stream(
source, stream_info=StreamInfo(extension=".xlsx")
)
print(result.markdown)
assert "#DIV/0!" in result.markdown
The assertion fails. Actual output:
## Results
| Case | Result |
| --- | --- |
| Valid value | 42.0 |
| Error 2 | NaN |
| Error 3 | NaN |
| Error 4 | NaN |
| Error 5 | NaN |
| Error 6 | NaN |
| Error 7 | NaN |
| Error 8 | NaN |
| Blank | NaN |
Expected: retain each saved error token in its corresponding cell, so readers can distinguish invalid references, division by zero, other errors, and missing data.
This is distinct from #2498 / #2499, which concern literal text recognized as missing. In a separate workbook containing an error-typed #DIV/0! cell and a text-typed #DIV/0! cell, pd.read_excel(..., dtype=object, keep_default_na=False) still returns NaN for the error cell while preserving the text cell. The error value is lost during pandas' openpyxl cell conversion, before HTML/Markdown rendering. No fix is included here.
- Lingua principale
- Python
- Stelle
- 198k
- Fork
- 15k
- Merge medio
- 2h 16m
- PR unite (30g)
- 9
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/markitdown
-
IpynbConverter uses a comment inside a Markdown code fence as the notebook titleForse già presa @Primaverah l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
microsoft/markitdown#2964 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
PPTX image alt text ending in a backslash breaks the Markdown imageForse già presa @dongyikuan919 l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/markitdown#2943 ·
I maintainer di solito rispondono entro 1 giorno
-
PPTX chart labels with pipes or line breaks produce malformed Markdown tablesForse già presa @dongyikuan919 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
microsoft/markitdown#2937 ·
I maintainer di solito rispondono entro 1 giorno
-
DOCX: math pre-processing re-parses every document.xml even without equations (32 s -> 17.5 s on a 12.5 MB document)Forse già presa @houyunsun l’ha presa 26 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
microsoft/markitdown#2834 ·
I maintainer di solito rispondono entro 1 giorno
-
URL fetch sends default python-requests User-Agent, Wikipedia returns 403Forse già presa @sushan5140 l’ha presa 31 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/markitdown#2820 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/markitdown
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
hugohe3/ppt-master#366 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
521xueweihan/HelloGitHub#4716 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
pcqpcq/open-source-android-apps#619 ·
I maintainer di solito rispondono entro 1 giorno
-
contribution Windows 主机
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Lee-xeo/Claude-Cage#1519 ·
I maintainer di solito rispondono entro 1 giorno