xxxxxxxxxx
import openpyxl
# Load the Excel file
workbook = openpyxl.load_workbook("your_file.xlsx")
# Select the worksheet
worksheet = workbook["Sheet1"]
# Retrieve the column range
column_range = worksheet["A:A"]
# Apply the formula to the entire column
for cell in column_range:
cell.value = "=your_formula"
# Save the changes
workbook.save("your_file.xlsx")