I have a excel file. read the excel file to datatable. then filter the datatable based on Lockbox Number(Batch) finally for all line items in the Batch one transcation number will be Generated i need to add the Transaction Number in the Transaction column and Posting Status column as Completed and Update the same in Input Excel how to do this using lInq Queries or For each row
Read the input excel using read range to a datatable say dt_data
Filter the data to a datatable say dt_result dt_result = dt_data.AsEnumerable().Where(Function(row) row("LOCKBOX NBR").ToString.Equals("200")).Select(Function(x) dt_data.Clone.Rows.Add(x.ItemArray.Take(5).Concat({"Completed",transactionNumber}).ToArray) ).CopyToDataTable
Give the necessary condition in the where clause .
Write the dt_result data to a new output sheet using write range