Back

Explore Courses Blog Tutorials Interview Questions
+2 votes
2 views
in RPA by (12.7k points)
edited by

 implemented a normal 'for each'-Loop (not the excel specific for each row) in my UIPath Project.The for-each Loop looks through a datatable with previously retrieved data from an excel file.The for-each-loop then itererates through the Data with an if-else behind it.

-> So the problem is: writing into the cells takes so much time, where else putting out a MessageBox with random text inside the if and else is done in milli-seconds, so the for-each-loop can't be the problem.

I ran that process with task manager opened and found out that Excel starts up, CPU percantage increases heavily, immidiately jumps to 0%... same happens again, for each iteration through the loop.

Why is that? Is there a more optimised way to do that?

Be UiPath Certification ready. Enroll in RPA Training in London offered by Intellipaat

1 Answer

+4 votes
by (29.5k points)
edited by

I see your concern is time, one way to go about it would be using ‘Read Range’ activity then manipulate the DataTable object itself and then write the object we used back to the same range using the ‘Write Range’ Activity. Using the object would be much faster in my experience.

Are you interested in learning RPA from the basics! Here's the right video for you on RPA provided by Intellipaat:

Related questions

0 votes
1 answer
asked Jan 22, 2020 in RPA by Abhishek_31 (12.7k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 20, 2020 in RPA by dev_sk2311 (45k points)

Browse Categories

...