Specific row count need to calculate and paste in another report

Hello Community,

I have an output excel sheet which will get the process output details.

In those details i need to get the count of L comun P,NP,I as showing in the screen shot

i.e how many P,NP,I are there in the L column

Those details(count) need to paste in another sheet.

Can you please suggest the flow how to get those count in another sheet

Regards

Hello @chaitanyaKumar

You can use the excpression as below to get the count.

(From d in dtKeys.AsEnumerable
let cnt = dtData.AsEnumerable.Where(Function (x) x(“ColumnName”).toString.Trim.Equals(d(0).toString.Trim)).Count
let ra = new Object(){d(0), cnt}
Select dtReport.Rows.Add(ra)).CopyToDataTable

ColumnName is the column name.

you can refer to below post.

Hi @Rahul_Unnikrishnan,

First of all, read the excel as a datatable(dt).Then you can filter the cells you want to write to excel as follows.

dt.Select("[ColumnName] = ‘NP’").Count.ToString
dt.Select("[ColumnName] = ‘P’").Count.ToString
dt.Select("[ColumnName] = ‘I’").Count.ToString

Regards,
MY

try this
d.xaml (19.9 KB)
case_Details.xlsx (12.2 KB)
Total_Cases.xlsx (8.9 KB)

Hi Jack,

I am facing this error.

update your uipath.excel.activities to latest version

Hi Jack,

I run your xaml, but it not taking any data. but the process is completed and it shows the excel time as run time. but no data is updated in excel.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.