Knowledge import fails for XLSX workbooks containing a chart sheet

Open
#47,189 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@juemimgcd is already working on this.

Since Nov 25, 2026.

  • #47193 by @juemimgcd — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the XLSX loop in api/core/rag/extractor/excel_extractor.py (around lines 83-90), which passes every sheet name to the header scanner near lines 318-332, where iter_rows() fails on a Chartsheet. Done means a workbook with a chart sheet extracts the Sales rows without an AttributeError. Open PR #47193 already targets this, so check it before starting.

Written by the indexing model from the issue text.

Description

🐞 bug
Self Checks
  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.
Dify version

main at 5e38d73d8f44b3c899c0ee64dd8d038813a2194a

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce
  1. Create an Excel workbook with a worksheet named Sales. Enter two column headings, Month and Amount, and two data rows, January, 125 and February, 180.
  2. Insert a chart using that data. In Excel, choose Move Chart → New sheet so the chart has its own tab. Save the file as .xlsx.
  3. Import the file into a knowledge base using the built-in extractor. For a local reproduction, call ExcelExtractor(path).extract() on the saved workbook.

I reproduced this through ExtractProcessor.extract() with ETL_TYPE=dify and openpyxl 3.1.5. As controls, both the plain workbook and the workbook with the chart embedded in the Sales worksheet returned the two sales rows.

✔️ Expected Behavior

The extractor returns the two rows from Sales. The separate chart sheet has no tabular rows to index.

❌ Actual Behavior

Extraction aborts before it can return any documents:

AttributeError: 'Chartsheet' object has no attribute 'iter_rows'

The XLSX loop enumerates all sheet names. It passes the chart sheet to the header scanner, which calls iter_rows().

Dominant language
Python
Stars
162k
Forks
25.6k
Avg merge
15h 9m
Merged PRs (30d)
606

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/dify

All issues in langgenius/dify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.