Sfoglia il codice sorgente

excel: get keys from every sheet (#2796)

tags/0.5.10
Weaxs 1 anno fa
parent
commit
20bd49285b
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      api/core/rag/extractor/excel_extractor.py

+ 1
- 1
api/core/rag/extractor/excel_extractor.py Vedi File

@@ -29,10 +29,10 @@ class ExcelExtractor(BaseExtractor):
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):

Loading…
Annulla
Salva