I have a process where robot perform read range and then write range into an Excel. But we’ve encountered an issue where robot got stuck at writing range into Excel. I have a log prior to write range, and the log was stuck for 14 hours before we had to kill the process.
We suspect that it is because Excel is opened by other users during the process, but why wouldnt an exception be triggered?
Are there any ways to prevent this?
Please give us more details. Is the write range done in a while loop?
Yes, I have a counter which increases after each loop and after it reaches a maximum number it will exit do while
It seems it does not do that. Try a bit of debugging, I mean, write to the console the counter after each iteration. That way in the output you will see if the counter works or not. Also, you could work on the exit condition see if the counter actually reaches, let’s say 42. Also, you should check that the exit condition is x == 42 as opposed to x == “42” (“42” in this case is a string).
Please try this and let me know of the outcome.
The counter works, because robot only gets stuck at write range occassionally.
The last log shows that it is still half way through the do while, should not have reach its exit time yet, but it just wouldnt proceed to the next step.