mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 18:49:01 +08:00
excel: get keys from every sheet (#2796)
This commit is contained in:
parent
6bd2730317
commit
20bd49285b
@ -29,10 +29,10 @@ class ExcelExtractor(BaseExtractor):
|
|||||||
def extract(self) -> list[Document]:
|
def extract(self) -> list[Document]:
|
||||||
"""Load from file path."""
|
"""Load from file path."""
|
||||||
data = []
|
data = []
|
||||||
keys = []
|
|
||||||
wb = load_workbook(filename=self._file_path, read_only=True)
|
wb = load_workbook(filename=self._file_path, read_only=True)
|
||||||
# loop over all sheets
|
# loop over all sheets
|
||||||
for sheet in wb:
|
for sheet in wb:
|
||||||
|
keys = []
|
||||||
if 'A1:A1' == sheet.calculate_dimension():
|
if 'A1:A1' == sheet.calculate_dimension():
|
||||||
sheet.reset_dimensions()
|
sheet.reset_dimensions()
|
||||||
for row in sheet.iter_rows(values_only=True):
|
for row in sheet.iter_rows(values_only=True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user