def get_excel_content(excel_path):
contents = []
if self.log_path.endswith('xls'):
workbook = xlrd.open_workbook(excel_path, formatting_info=True)
sheet = workbook.sheet_by_index(0)
start_row = 0
for cell in sheet.merged_cells:
row, row_range, col, col_range = cell
if row != start_row:
# print()
start_row = row
at_1st_col = True
else:
at_1st_col = False
if at_1st_col or start_row == 0:
content = [item for item in sheet.row_values(row) if (item and item != '/' or item == 0)]
if content:
# print(content, end=" ")
contents.append(content)
return contents