I'm running a Python script that loops through different excel files, and each of these files runs some macros. Some of these files are incomplete, so I get an Excel error like: !image
I want to automatically enter the acknowledge (only one option: !image2 ) I am using xlwings, so I tried to use display_alerts, both on the app and on the file:
app = xw.App(visible=False)
app.display_alerts = False
wb = app.books.open(copy_file)
wb.DisplayAlerts = False
The alert keeps popping up. Any advice?