Unverified Commit ad5f27bc authored by WangBooth's avatar WangBooth Committed by GitHub

fix openpyxl dimensions error (#1041)

parent 05e0985f
...@@ -30,6 +30,8 @@ class ExcelLoader(BaseLoader): ...@@ -30,6 +30,8 @@ class ExcelLoader(BaseLoader):
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:
if 'A1:A1' == sheet.calculate_dimension():
sheet.reset_dimensions()
for row in sheet.iter_rows(values_only=True): for row in sheet.iter_rows(values_only=True):
if all(v is None for v in row): if all(v is None for v in row):
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment