Check for excel cell that is empty and delete it!

Hi all,

I am performing data scraping and excel is populated with data including empty cells for few rows.

so I try to delete rows that are empty from the datatable using the below statement in a do while loop.

I have counted the total number of rows . so I check for condition intDeleterow < totalrows

if (ExtractDataTable.Rows(intDeleterow)(“PRODUCT NAME”).ToString.Trim= “” )

totalrows - 1

intDeleterow = intDeleterow + 1

this doesn’t seem to work fine ! How do I overcome this issue ?

Please do help !


have you tried this…