From 20bd49285bc714fa4eb87b54762625daf259d9f4 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Tue, 12 Mar 2024 01:59:25 -0700 Subject: [PATCH] excel: get keys from every sheet (#2796) --- api/core/rag/extractor/excel_extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/rag/extractor/excel_extractor.py b/api/core/rag/extractor/excel_extractor.py index 532391048bbd49..30989be880384d 100644 --- a/api/core/rag/extractor/excel_extractor.py +++ b/api/core/rag/extractor/excel_extractor.py @@ -29,10 +29,10 @@ def __init__( def extract(self) -> list[Document]: """Load from file path.""" data = [] - keys = [] wb = load_workbook(filename=self._file_path, read_only=True) # loop over all sheets for sheet in wb: + keys = [] if 'A1:A1' == sheet.calculate_dimension(): sheet.reset_dimensions() for row in sheet.iter_rows(values_only=True):