This question is a follow up to: Openpyxl: TypeError - Concatenation of several columns into one cell per row
What I want to do: I want to concatenate t
Correct implementation:
def concat_f_to_m():
for row_value in range(1, sheet.max_row+1):
values=[]
del values[:]
for row in sheet.iter_rows(min_col=6, max_col=14, min_row=row_value, max_row=row_value):
for cell in row:
if cell.value != None:
values.append(str(cell.value))
sheet[f'E{row_value}'].value= ''.join(values)
else:
del values[:]
break
concat_f_to_m()