I have an excel file where I have stored the invoice file names and I have invoice files in a folder.
Now I want to validate the files with the names in the excel. If the names and files matches(exists) then I want to append to “Yes” against the Name in the excel, if not append “No”.
As you need the status on excel instead of reading and doing on datatable and writing use for each row in excel so that the status gets to excel directly
Step-1: Read excel file into a data table
Step-2: Store invoice filenames into an array of strings
Step-3: for each row in data table
if arr_InvoiceDetails.Contains(row(“File”).ToString),
then writecell status as “yes”
else writecell status as “No”