Hi all,
I have a process where I need to read a lot of Excel files (classic activities) as datatables to check specific info. It happens that I need to read the same file several times in a row (inside a for each row loop). Until some weeks/months ago, this was no issue.
But since those few weeks/months, we have issues with Excel sometimes, that, like in this case, it gets stuck at one file that could be read several times before in that loop. Maybe it didn’t close properly or whatever, but I used a TryCatch around this activity already. But it never throws an exception, it just gets stuck trying to read the file. I need to kill excel.exe from Task manager, then it can continue.
I wanted to use timeout, but that’s not available for Excel activities. So I used the Timeout activity from UiPath.Core.Activities and set it to 5 seconds. I surround it with TryCatch and in Catches, add a kill process activity and another delay.
But it still gets stuck. (noticed after 1 hour has passed) The Timeout activity does not throw any exception.
I think I remember that when I tested it on our Studio VM some weeks back, this approach has worked. But it doesn’t seem to work on our Robot VM.
So what could be the reason the Timeout activity is not throwing an exception after 5 seconds?
(On a sidenote: We encounter several issues with Excel being stuck or being unable to read Excel files stored on Sharepoint (Excel being “busy” and other errors) since said time. I will have to open different threads for those issues…)
Using these packages in Studio 24.10.1 (UIAutomation gave us several problems on version 24.xx.x; but I already tried higher versions as well, issue started occurring on lower versions of any package… so no, updating didn’t help)
Luckily, this specific issue occurs in a process we only execute once per month, so I still can intervene manually or let it run from Studio. But this should not be necessary…
Thanks for any hints.