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.

fix openpyxl dimensions error (#1041)

WangBoothad5f27bc5f0c
diff --git a/api/core/data_loader/loader/excel.py b/api/core/data_loader/loader/excel.py
index 580abd9b1db..5e76c21a8ff 100644
--- a/api/core/data_loader/loader/excel.py
+++ b/api/core/data_loader/loader/excel.py
@@ -30,6 +30,8 @@ class ExcelLoader(BaseLoader):
wb = load_workbook(filename=self._file_path, read_only=True)
# loop over all sheets
for sheet in wb:
+ if 'A1:A1' == sheet.calculate_dimension():
+ sheet.reset_dimensions()
for row in sheet.iter_rows(values_only=True):
if all(v is None for v in row):
continue