I have 2 excel file.
- file input as below.
- file chk data.
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.
I have 2 excel file.
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.
Remark My data input file have 3K rows.
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!!!
@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.
@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.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.