simmilarly for filtering the rows having status as Inactive , Discontinued or Graduated
use the assign activity dt3=dt1.AsEnumerable().Where(Function(row) row(“Status”).ToString.Equals(“Inactive”) Or row(“Status”).ToString.Equals(“Discontinued”) Or row(“Status”).ToString.Equals(“Graduated”)).CopyToDataTable
write the dt2 and dt3 into excel using write range
Hi Sir, Im just wondering where is the Code or activity to delete/Remove the entire row?
Your activity worked on me, but the thing is it just only copy the row that contains(Inactive, Discontinue,Graduated) to new Sheet. But it did not removed to the original sheet
You can delete the data, but i will tell the log what i had implemented.
Let’s say u had original data in sheet1. Now using read range, u read the excel and store in dt1
Now you update the status column as Active and then filtering the datatable so that it split into two tables, one table contains only rows having Status as Active , let’s say it is in dt2 other table is storing the rows having the Status as Inactive, Discontinued, Graduated as dt3
Now u are writing to the original sheet Sheet1, it will be having same effect of deleting, it will overwrite the data in the Sheet1 excel to the data contained in dt2. thus sheet1 contains only data which is of Active Status