Delete rows from Excel then write to same sheet

@kasey.betts the one which provided by @Nithinkrishna works pretty well. since you don’t want the values matches fiscal year, place a “not” in the query.

dt1.AsEnumerable().Where(Function(x) Not YearArray.Contains(Convert.ToString(x(“FiscalYear”)))).CopyToDataTable

Hope this helps

1 Like