I have to find out certain data by putting some condition on excel. Exactly list of countries whose growth is greater than 2%. Expression is giving me type conversion error. Please help me with this.
Welcome to our UiPath community.
Can you please share screenshot of the sample data and also show us the expression you are using here.
Welcome to the forums
Please share the expression you are trying to do, It’s better if you give more information regarding to your issue
Thanks
I need help in getting expression for top 10 countries whose growth is greater than 2%
assign this to list of string to get top 10 countries where growth% > 2( i assume your country column is called Country otherwise you can change it to something else in the below code)
dt.AsEnumerable.where(function(x) not x("Growth%").ToString.Equals("-") and not x("Growth%").ToString.Equals("")).CopyToDataTable.AsEnumerable.where(function(y) Double.Parse(y("Growth%").ToString) > 2).CopyToDataTable.AsEnumerable.OrderByDescending(function(z) Convert.ToDouble(z("Growth%"))).CopyToDataTable.AsEnumerable.Take(10).AsEnumerable.Select(function(a) a("Country").toString).tolist
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.