import win32com.client from pathlib import Path excel = win32com.client.Dispatch("Excel.Application") excel.DisplayAlerts = False #excel.Visible = True filename = Path("Excel\\Dash_LH_Wien.xls") path = str(filename.parent.resolve()) print(filename.resolve()) wb = excel.Workbooks.Open(filename.resolve()) try: for source in wb.LinkSources(1): print(" --> " + source) if Path(source).exists(): excel.Workbooks.Open(source) else: print(" !! does not exist !!") except TypeError: print(" --> " + "no LinkSources") wb.RefreshAll() wb.Save() wb.Close(True) excel.Application.Quit()