[Bee] Excel backend duplicates cells of a sparse table as extra tables
Author: samiucCreated Sep 11, 2026Updated Sep 17, 2026
Labelsbugxlsx
Bug
When a worksheet has a single table with empty cells, non-empty cells that are not directly adjacent to the rest of the table (e.g. a column whose first value has an empty cell above it) are exported twice: once inside the main table, and again as a separate small table.
Minimal sheet (sparse_sheet.xlsx): sparse_sheet.xlsx
Expected: 1 table of shape (4, 3).
Actual: 2 tables, shapes [(4, 3), (2, 1)]. Markdown export:
| ID | Name | Note |
|------|--------|--------|
| 1 | alpha | |
| 2 | | foo |
| 3 | | bar |
| foo |
|-------|
| bar |
foo/bar already appear in the first table and are repeated as a standalone table. On real sparse sheets (e.g. ~100-column exports) this produces many such duplicate fragment tables.
Steps to reproduce
Attached: sparse_sheet.xlsx and the code:
from pathlib import Path
from docling.document_converter import DocumentConverter
xlsx = Path("sparse_sheet.xlsx")
doc = DocumentConverter().convert(xlsx).document
xlsx.with_suffix(".md").write_text(doc.export_to_markdown())
shapes = [(t.data.num_rows, t.data.num_cols) for t in doc.tables]
print(f"actual: {len(doc.tables)} tables of shapes {shapes}")
assert shapes == [(4, 3)]
Output:
actual: 2 tables of shapes [(4, 3), (2, 1)]
AssertionError
Docling version
Docling version: 2.110.0
Docling Core version: 2.91.0
Docling IBM Models version: 3.14.0
Python version
Python 3.12.12
Source: docling-project/docling