diff --git a/pyxform/xls2json_backends.py b/pyxform/xls2json_backends.py index 50ea1944..78275ab9 100644 --- a/pyxform/xls2json_backends.py +++ b/pyxform/xls2json_backends.py @@ -52,7 +52,7 @@ def trim_trailing_empty(a_list: list, n_empty: int) -> list: def get_excel_column_headers(first_row: Iterator[Optional[str]]) -> List[Optional[str]]: """Get column headers from the first row; stop if there's a run of empty columns.""" - max_adjacent_empty = 20 + max_adjacent_empty_columns = 20 column_header_list = list() adjacent_empty_cols = 0 for column_header in first_row: @@ -60,7 +60,7 @@ def get_excel_column_headers(first_row: Iterator[Optional[str]]) -> List[Optiona # Preserve column order (will filter later) column_header_list.append(None) # After a run of empty cols, assume we've reached the end of the data. - if max_adjacent_empty < adjacent_empty_cols: + if max_adjacent_empty_columns < adjacent_empty_cols: break adjacent_empty_cols += 1 else: @@ -81,7 +81,7 @@ def get_excel_rows( cell_func: Callable[[aCell, int, str], Any], ) -> List[Dict[str, Any]]: """Get rows of cleaned data; stop if there's a run of empty rows.""" - max_adjacent_empty = 20 + max_adjacent_empty_rows = 60 col_header_enum = list(enumerate(headers)) adjacent_empty_rows = 0 result_rows = [] @@ -99,7 +99,7 @@ def get_excel_rows( if 0 == len(row_dict): # After a run of empty rows, assume we've reached the end of the data. - if max_adjacent_empty < adjacent_empty_rows: + if max_adjacent_empty_rows < adjacent_empty_rows: break adjacent_empty_rows += 1 else: