Untitled
unknown
plain_text
21 days ago
629 B
2
Indexable
Never
import openpyxl # The path to your Excel file excel_file_path = 'path_to_your_excel_file.xlsx' # Load the workbook and select the active sheet workbook = openpyxl.load_workbook(excel_file_path) sheet = workbook.active # Start from row 14, loop until there are no more values in column A for row in range(14, sheet.max_row + 1): # Check if there's a value in column A (you can change this to column B by using 'B' + str(row)) if sheet['A' + str(row)].value is not None: # Add an 'x' to column C in the same row sheet['C' + str(row)] = 'x' # Save the workbook with changes workbook.save(excel_file_path)