I have a project that imports data from 3 applications. 2 of them I can use the Get Text from element, and 1 I need to use CV screen scope.
If I run the 2 that use Get Text and let them copy in Excel, no problems.
If I run the CV screen scope one and disable the other 2, no problems.
If I run them all 3 after each other in a sequence, Excel keeps crashing
I use 3 different Sheets in Excel, could the changing of sheets be the problem?
UiPath does not give any crash info, because it is just Excel that is crashing.
Sometimes Excel is not really crashing, but “Stuck”, if I manually click it, the automation continues.
Here is a printscreen of the top of my project where I start using the Excel file:
The data imported to Excel is really not that big. For every application the import is around 30 cells, so I think the amount of data is not the problem. That should never be too much to crash excel I assume? I even deleted most of the formulas that will normally apply to the imported text, but it still crashes.
I tried putting “Delays” of around 2 second so UiPath can take its time, but also no succes.
This is the error message that I get in UiPath sometimes:
“Get Text ‘Mon 27’: Could not write cell $A$1 with row offset 0.”
I guess this is because Excel allready stopped working? Or is Excel stopping BECAUSE of this error?
The 5000 times I put there so it could run for many hours, I was not hoping that it was writing 5000 times!! at once
What I thought and hoped it would do.
Get data from application 1, paste it in excel sheet 1,
If certain cell is “true” after calculations → do something
Get data from application 2, paste it in excel sheet 2,
If certain cell is “true” after calculations → do something
Get data from application 3, paste it in excel sheet 3,
If certain cell is “true” after calculations → do something
Wait 5 second
Repeat.
If I use the 2 applications that dont use CV screen scope, it works perfectly, also with the 5000x repeat code in it. It goes mainly wrong when I start using the application that needs to use CV screen scope.
But that’s what Repeat does - it literally repeats the activities inside it that many times. This is how you should do it.
Get data from application 1, add to sheet1 datatable,
If certain value in dt is “true” after calculations → do something
Get data from application 2, add to sheet2 datatable,
If certain value in dt is “true” after calculations → do something
Get data from application 3, add to sheet3 datatable,
If certain value in dt is “true” after calculations → do something
Write sheet1 datatable to Excel
Write sheet2 datatable to Excel
Write sheet3 datatable to Excel
It ran the sequence 20 times, without problems/crashes. So with that information I can tell that it indeed tried to do the sequence 5000 times, but also every single action in the sequence 5000 times?!
What would be the correct way to keep the application running?
I also had something installed that would execute every 5th run, with a “IF CurrentItem mod 5 = 0”, therefore the REPEAT option was good because it keeps count of how many times the sequence ran.
For the datatable, I would love to try it out if there are no other solutions, but it seems a bit advanced for my level at this moment.
Thanks again for all your help!
EDIT: I just ran it again when it was on 20x, and it crashed again.
Are you sure that the “Repeat number of times” does every action so many times at once?
I remember having it at 1.000.000.000 before so it just kept running, without any problems. If it literally tried to write data to excel so many times it would always crash right?