fix(documents): skip chart-only sheets when reading XLSX files

This commit is contained in:
lux-liang authored and Xubin Ren committed 2026-10-18 16:22:53 +08:00
1 parent 6330b748de
commit a2f9fae8fe
2 files changed
+34 -2

No files matched your search

+2 -2
View File
@@ -251,8 +251,8 @@ def _open_xlsx_line_source(path: Path) -> DocumentLineSource:
extracted_line = 0
wrote_document_content = False
try:
for sheet_name in workbook.sheetnames:
worksheet = workbook[sheet_name]
for worksheet in workbook.worksheets:
sheet_name = worksheet.title
# Producer-supplied dimensions can omit cells that are present in the XML.
worksheet.reset_dimensions()
wrote_header = False