0

I'm trying to change the text in the first row of some columns in an Excel file. I tried this and it is not changing the cell text. I'm a total newbie so I'm not sure where to go with it. Also since I really only need to search the first row, this is probably overkill.

i = 0
for r in range(1,sheet.max_row+1):
for c in range(1,sheet.max_column+1):
    s = str(sheet.cell(r,c).value)
    sheet.cell(r,c).value = s.replace("Language 1 - Language","Language")
                
i += 1

0 Answers0