Untitled
unknown
python
a year ago
368 B
4
Indexable
Never
import openpyxl srcfile = openpyxl.load_workbook('input.xlsx', read_only=False) # file name for the input main = srcfile['Worksheet'] # Name of actual worksheet for row in main.iter_rows(max_col=2): raw_value = row[0].value if raw_value is None: raw_value = 0 row[1].value = abs(float(raw_value)) srcfile.save('output.xlsx')