Delete Sheet Item

@Shivam_Rana

Please try the below sequence and you can delete all the rows with your required condition.

Please use this syntax in value to save (From row In dt1.AsEnumerable() Where Not (row.Field(Of String)("Column1") = "No") Select row).CopyToDataTable()

Here Column1 is your column name and dt1 is your datatable variable.

Sample Input:

Sample Output:

Regards

Read Range into a datatable
Filter Data Table to remove the rows you want
Write Range to a new Excel file

Hi @Shivam_Rana ,

An Alternative on deleting the Whole Data present in the sheet, you could check the below :

@Shivam_Rana

If you find the solution for your query please do mark as solution to close the loop

Happy Automation!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.