|Roll No|New Val|
|10390|A|
|20987|B|
|30965|C|
|10987|A|
|30764|C|
|20864|B|
Based on roll number starting from 10 , 20 or 30 I need to add new val A B or C without loop.
|Roll No|New Val|
|10390|A|
|20987|B|
|30965|C|
|10987|A|
|30764|C|
|20864|B|
Based on roll number starting from 10 , 20 or 30 I need to add new val A B or C without loop.
Without Loopβ¦Now you need to use Linq.
Hi @SakshiGupta ,
can we use excel formula to achieve this requirement without loop.
Sample Formula: =IF(ISNUMBER(SEARCH(β10β,A2)),βAβ,IF(ISNUMBER(SEARCH(β20β,A2)),βBβ,IF(ISNUMBER(SEARCH(β30β,A2)),βCβ,ββ)))
Use below steps in Uipath:
Use excel application scope to open the excel file which contains only one column with RollNo.
inside excel application scope use write cell activity to create header for New val β A2 = βNewValβ
Use write cell value to write the formula in the B2 Cell.
β=IF(ISNUMBER(SEARCH(β+CHR(34)+β10β+CHR(34)β,A2)),β+CHR(34)+βAβ+CHR(34)+β,IF(ISNUMBER(SEARCH(β+CHR(34)+β20β+CHR(34)+β,A2)),β+CHR(34)+βBβ+CHR(34)+β,IF(ISNUMBER(SEARCH(β+CHR(34)+β30β+CHR(34)+β,A2)),β+CHR(34)+βCβ+CHR(34)+β,β+CHR(34)+" β+CHR(34)+β)))"
i am not very fond of linq. since we can use the above method to implement the same without any loop. please try and let us know. thanks.
Use Write Cell activity and use this formula
After that you can use Fill Range and pass the Range to fill the above formula
Hope this may help you
Thanks
Hi @SakshiGupta,
Your request of βWithout loopβ is not achievable. Such a thing does not exist. Without iteration none of the approaches will work.
Standard for each row activity is more than sufficient for your case.
Standard UiPath activities are not slow. Please read this excellent thread / test from @postwick to see the test results.
Yeah I agree with you @jeevith . Whatever approach we would use it will take some time in background and process it. Thanks for your note.
the range will be dynamic how to overcome that
my bot will process more that 40000 rows , the rest of the process is not taking time but this part is consuming a lot of time. how to over come that?
my bot will process more that 40000 rows , the rest of the process is not taking time but this part is consuming a lot of time. how to over come that?
Can you attach xaml file
You can use DataTable.Rows.Count
which will give you the entire count of Rows If the columns are fixed letβs suppose D
Then βAβ + DataTable.Rows.Count +β: Dβ + DataTable.Rows.Count
This will act dynamically
Hope this will help you
Thanks
getting error autofill range of class fail
it worked thanks⦠reduced the time
Sure. please find the attached work flow it is having the steps i suggested above. please try and let us know. i am sure it will not take so much time for 40000 rows. please test it and let us know. thanks.
Excel FormulaDemo test.zip (9.2 KB)
You canβt overcome it. Itβs 40,000 rows. More rows = more time.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.