I am working on a portal where i need to do this

Hi,

I am working on a portal where i need to enter the name of engineer as per the least count in excel

Initially in excel the count for everyone will be 0 but as I enter the name i need to add the count in the excel and increase it form 0 to 1,2,3,4 etc

how get it done

when bot run for the 1st time excel will be like

in second run

Use Read Range For sheet say DT1
Then use For Each Row for DT1
Use row(“Name”).Tostring for type that name or u can use it using this exp.
Then use Assign Row(“Count”)=(Cint(Row(“Count”).ToString)+1).ToString

After for each row use Write Range

@ImPratham45 i need the name according to the least count in the excel

Then use this for getting min no from that column
DT.AsEnumerable.Min(function(row) Convert.ToDouble(row(“Count”).ToString))
It will give you smallest no in that column

@ImPratham45 how can can i get the name of person against that number

Then u can use if condition in for each row
say
If Row("Number).Tostring.trim=DT.AsEnumerable.Min(function(row) Convert.ToDouble(row(“Count”).ToString))
then you can use that name

@ImPratham45 can you please share a sample i am trying but i am not getting ’

i am getting this error

in assign variable countval is string type

Datatype is Double

can you please rectify it please Main.xaml (9.5 KB) project.json (964 Bytes) today.xlsx (8.0 KB)

Main (1).xaml (10.4 KB)

@ImPratham45 thanks it working now one more thing after getting the name i want to increase the count for eg. Alok has 1 now when bot runs it gets as Alok as least count after bot updates that on portal i need to increase that count from 1 to 2

Then as i mentioned earlier use assign for row(“Number”)=(Cint(row(“Number”).tostring)+1).tostring

@ImPratham45 i am trying but it not updating the count can you please share the same in please

Have u used write range after for each row???

yes

application scope and then write range and assign as you told

image

thanks it working

One query i have if all the counts are same then it will pick all name how to make sure it only get one at a time

It will give you one by one no issue