How to check already processed row

Hi Guys,

want to remove data from excel which are processed ,

i am having one output file as attached so after reprocessing not okay customers they will become ok, so how to remove those rows of customers from excel which are got okay.

thanks in advanceOutput file.xlsx (9.0 KB)

@amruta_pawar Are you able to Update Not Okay Customers to Okay ? Are you Performing that already ? If you are already performing it, then You just need to find the rows which have Ok in it, then Delete them using Invoke Method Inside a For Each Loop.

1 Like

yes after some correction in data we have to reprocess not okay then statement status column will become okay , so how i can find the same customers which are now having status as okay?

As all other fields will be same till status column.

@amruta_pawar You can Follow these Steps :

  1. After the After the Status Column is Updated, You can use the Workbook Read Range Activity to read the File.
  2. Then use this linq Query to get the Data Rows of the Columns Which are “Okay” in this way :
    dataRowArray = DT.AsEnumerable.Where(Function(x)x(“Statement Status”).ToString.Trim.ToLower.Equals(“okay”)).ToArray

Where dataRowArray is of the type Array of DataRow

  1. Next, In a For Each Loop for dataRowArray, Change Type Argument to DataRow
    Inside For Each Row, Use Invoke Method Activity, where Target Object is the Datatable and Method Name is Remove, with parameters as item Change the Type to Data Row.

  2. The Resulting Datatable will be having the Removed Rows, You can Write this Datatable to the Output File using Write range Activity.


sounds good but what remove method will do, is it gonna remove duplicate data which was not okay one?

because table may contain some customers which are not processed and genuine not okay, so we dont want to remove those.

@amruta_pawar The Remove method will remove the rows which has the Status Column as “okay” in it

but we dont want to remove okay customers, we want to remove only those customers who became okay after second run.

so in output file same customer will have 2 rows first will be of not oaky and then second will be okay, so we have to remove not okay one.

@amruta_pawar Getting a Bit Confused here :sweat_smile:
Can you explain what you are trying to Do in Steps or using Screesnhots, maybe in that case I’ll have a Better Understnading :sweat_smile:

1 Like

ok please find attched excel file for reference , i am having output file after processing i need expected output file.Expected_Output file.xlsx (9.2 KB)

Output file.xlsx (9.3 KB)

I want to remove those duplicate not okay customer

@amruta_pawar Check the Workflow :
Delete the Output Sheet in Excel File, Run the Workflow, Check the Excel File, It Should be the Output you needed. (9.8 KB)

1 Like

ohh wow thank you so much for your efforts and time, just one more request how i can add more columns into group by as i want to add company code,frequency,start date,end date to our linq.

@amruta_pawar I have Updated the workflow a bit, Check if this is What you needed : (9.7 KB)

thanks man its working as expected , you saved me :stuck_out_tongue: this was the only scenario where i was stuck, thanks a ton. :slight_smile:

1 Like

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