The code works fine, the only issue is the excel.Visible = False works fine on my colleague's laptops but doesnt on mine. Also I think there is same issue with excel.DisplayAlerts = False.
any reason why this is happening?
below are my codes
import win32com.client as win32
excel = win32.gencache.EnsureDispatch('Excel.Application')
excel.Visible = False # Set Excel to be hidden
excel.DisplayAlerts = False
wb = excel.Workbooks.Open(filename)
ws = wb.Sheets('tab_name')
ws.Range('K3').Value = 0.55
ws.Range('K4').Value = 1
ws.Range('K7').Value = 0
ws.Range('K8').Value = 1
ws.Calculate()
wb.Save()
wb.Close()
excel.Quit()