Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

filter excel empty sheet (#8194)

Jyongaf92f19291cc
diff --git a/api/core/rag/extractor/excel_extractor.py b/api/core/rag/extractor/excel_extractor.py
index f0c302a6197..526c66042ca 100644
--- a/api/core/rag/extractor/excel_extractor.py
+++ b/api/core/rag/extractor/excel_extractor.py
@@ -38,7 +38,10 @@ class ExcelExtractor(BaseExtractor):
for sheet_name in wb.sheetnames:
sheet = wb[sheet_name]
data = sheet.values
- cols = next(data)
+ try:
+ cols = next(data)
+ except StopIteration:
+ continue
df = pd.DataFrame(data, columns=cols)
df.dropna(how='all', inplace=True)