Check data in another file?

I have 2 excel file.

  1. file input as below.
    image
  2. file chk data.
    image

If data column APAPNO in file input match data in column APAPNO in file config.

If found delete row in file input that match with file chk,

Please guide me about it.

2 Likes

@Nithinkrishna Can you guide me for solve it?

1 Like

Remark My data input file have 3K rows.

1 Like

Hi @fairymemay,

Please try below query to get only non-matching columns when compared with the check file. Use this query in assign activity.

dt_fileCheck.AsEnumerable.Where(Function(fileCheckrow) NOT dt_inputFile.AsEnumerable.Any(Function(inputFileRow) fileCheckrow(“APAPNO”).tostring = inputFileRow(“APAPNO”).ToString)).CopyToDataTable

where dt_fileCheck - datatable variable having check file data
dt_inputFile - datatable variable having input file data.

Instead of deleting, it filters for non-matching rows, where rows can be again pasted back to the source excel file.

Hope it helps!!!

1 Like

@Ramya_K Your output = data that not match with file chk data right ?

1 Like

Hi @fairymemay
Yes.

1 Like

@Ramya_K It replace data in same sheet auto right?

@fairymemay we need to use write range accordingly.
Using the query we are filtering the data. Then we need to use write range activity providing the filtered datatable variable.

@Ramya_K Can you guide me with flow ?

input11.xlsx (8.6 KB)
chk data.xlsx (8.6 KB)

@fairymemay sure. Let me try

1 Like

@fairymemay can we write the filtered data in new separate workbook ?

If no, then we need to first clear the data in input file and then use write range activity to write the filtered data in the same sheet.

@Ramya_K I want write filter data in same sheet.

1 Like

Filter_Non_Matching_Rows.xaml (10.6 KB)

@fairymemay Please see if this workflow helps you.

1 Like

@fairymemay if this workflow helped, please mark this post as solved. Thanks!!!

1 Like

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