Filter the values that loops

Hi,
I have a task where I need to get the data from excel and filter it.55. In this the row which has same sales id I should take it out and write it in one note pad eg: SO2 has only one row so it should be in one notepad, S03 is in two-row so those two-row data should be in another notepad how could I achieve this

2 Likes

Hi @soumi_soumiya

try this

Based on select range activity you can do looping it from by using open application

Thanks
Ashwin S

soumi_soumiya.xaml (7.8 KB)
hope this XAML Helps

3 Likes

Hi,

To achieve this you can read the excel by using read range activity and get the unique salesid from the result data table.

Then use foreach activity to loop through the unique.

Use the ‘item’ variable of foreach in select Datatable and get the desired single sales id results as datarow array .Convert the data rows to data table.

Then create the file using write activity with the same ‘item’ variable in it and convert the datatable to string using output datatable activity.

Write the string into the file.

1 Like

Hi @soumi_soumiya

  • read the excel
  • get unique values from SalesId
  • loop the unique SalesId
  • filter the SalesId in excel datatable and store it in another datatable
  • loop the filter datatable and write it in notepad
1 Like

Thanks for your reply…
dt_Main.DefaultView.ToTable(True, “SalesId”) could you explain me this

2 Likes

Hi @soumi_soumiya

It will help you to retrieve the distinct value based on the excel column sales id

Thanks
Ashwin S

1 Like

this how you get distinct values from the column named "SalesID"

1 Like

Thanks

1 Like

Did that solved your issue?

1 Like

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