How to skip empty cells in when reading a column, there is no value in the cell please advise

excel
csv
email
outlook
activities

#1

image

that is my condition if there is nothing in the cell values do not send and if there is a value in cell thern send mail… please advise advise me


#2

Hi,

“is nothing” means that the variable has not been set to anything. What you really want to do is check if empty string “” is the value.

row("MailID").ToString.Trim = ""

Hope that helps.

Thanks.


#3

I guess you could try both of below which will check for null,empty,whitespace

if (NOT String.IsNullOrEmpty(val) AND NOT String.IsNullOrWhiteSpace(val))
{
 
}

#4

@ClaytonM Thanks you its working :wink:


#5

That working for me too. thank you