Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions office/lib/excel/SplitExcel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def process_xls(filepath: str, column: int, worksheet_name: str = None) -> str:
cols = worksheet.ncols
split_data_dict = {}
for r in tqdm(range(rows)):
row_data = [worksheet.cell(r, c).value if worksheet.cell(r, c).value else ' ' for c in range(cols)]
row_data = [worksheet.cell(r, c).value if worksheet.cell(r, c).value != '' else ' ' for c in range(cols)]
temp_data = row_data[column - 1]
temp_data_list = split_data_dict.get(temp_data, [])
temp_data_list.append(row_data)
Expand Down Expand Up @@ -105,7 +105,7 @@ def process_xlsx(filepath: str, column: int, worksheet_name: str = None) -> str:

split_data_dict = {}
for row in worksheet.rows:
row_data = [cell.value if cell.value else ' ' for cell in row]
row_data = [cell.value if cell.value is not None else ' ' for cell in row]
temp_data = row_data[column - 1]
temp_data_list = split_data_dict.get(temp_data, [])
temp_data_list.append(row_data)
Expand Down