xlapp = win32com.client.DispatchEx("Excel.Application") wb = xlapp.Workbooks.Open() chk1 = wb.RefreshAll() print(chk1) chk2 = x