How to delete particular row in excel?

this is working fine but only thing is if the column only contains System.exception then am getting the error: no source due to we are removing all the rows of contains System.exception.

how to resolve this?