import win32com.client
excel = win32com.client.Dispatch("Excel.Application")
excel.Visible = False
workbook = excel.Workbooks.Open(r"C:\path\to\example.xlsx")
sheet = workbook.Sheets("Sheet1")
sheet.Cells(1, 1).Value = 10
sheet.Cells(1, 2).Value = 20
workbook.Application.Calculate()
result = sheet.Cells(2, 1).Value
print(f"Результат формулы: {result}")
workbook.Save()
workbook.Close()
excel.Quit()