So here if Mumbai chair plastic are same then cost and wood required should get added and so on. Can anyone help me with this
Hi @abhide !
Sure, here is a suggestion that seems to work fine using Linq queries:
Cumulate_numbers.xaml (6.9 KB)
Let us know if it works for you ! Don’t forget to change your read range and write range so it fits your filepath and sheetname
Instead of naming the column if I want to take column index how can it be done ?. I mean instead of city what can i write column(0) ? can you please help
Hi @abhide ! Yes you can exchange it by index values.
I have assumed that you treat only with integers. So I changed the conversion + changed with index instead of column names:
Here is a suggestion that could work with your case:
Cumulate_numbers.xaml (6.9 KB)
I really appreciate your help. But i am getting above error. Let me attach my excel file so that U can get better idea. Once again i thankyou a lot
comparison.xlsx (36.3 KB)
Hi @abhide !
With the real data indeed it’s easier.
The problem is:
- your data has empty values, that’s why it was not working, so I just added this to work:
(From d In A_DT.AsEnumerable
Group d By k=d(0).toString.Trim, l = d(1).ToString, s=d(2).ToString Into grp=Group
Let gs = grp.Sum(Function (x) CDbl(“0” & x(3).toString))
Let ms = grp.Sum(Function (x) CDbl(“0” & x(4).tostring))
Let ra = New Object(){k, l,s,gs,ms}
Select output_DT.Rows.Add(ra)).CopyToDataTable - BUT the data you sent has like 25+ rows so the method that I gave you won’t work: it was for 2 columns.
So here is another suggestion instead:
Cumulate_numbers.xaml (25.4 KB)
It’s not a good one if speaking about performance, but for the Linq approach @ppr might have a better idea for dynamic columns ?
Hi @Hiba_B and @prasath17 Thanks a lot both of you for answering my query. I have installed all the required packages
Still i am getting this error
Can you please help me further and if possible send me screen shot of the activity. once again thanks a lot both!!!
Well that’s because we use different versions of Studio. I use 21.4 and you probably use an oldest version.
Can you upgrade ?
If I send you screenshots it will be veeeeery long haha as there are like 20+ activities behind the “Missing activities”
Yes thats true. Let me upgrade it on my personal machine and see. Thanks a lot for your input
Hi @Hiba_B mam and @prasath17 sir, the code is running extremely well. I sincerely thank @Hiba_B Mam . The code is taking around 15 min to run for 10 entries. and I actually have 2000 entries in my excel file. Is there any way we can solve this issue. or we can modify excel file before running it in to uipath so the time can be reduced. Eagerly waiting for your inputs
That’s indeed the main problem: performance
To reduce drastically the time, it’s better to use Linq approach. To use it, we need to have static columns.
→ Do you always have exactly the same name columns ? We could try something with it
Hi @Hiba_B Mam, can we do this thing as
We have 26 columns we can add two more columns as add first 13 and then add second 13. So we can make use of two columns only and not the columns whose name will keep changing
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.