Skip to content

Commit

Permalink
excel: get keys from every sheet (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weaxs authored Mar 12, 2024
1 parent 6bd2730 commit 20bd492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/rag/extractor/excel_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 20bd492

Please sign in to comment.