Multiple condition to check column value

Hi,

In excel sheet the column email has input like NA or email-id or it can be blank
how can i just get the record which is blank or contains NA

now i am able to get the NA records but i need to get the blank record as well in the same time
row(“Email”).ToString = “NA”

Hi @indrajit.shah

You can use the below code to check if it is blank. It will return a boolean result

string.IsNullOrEmpty(row(“Email”).ToString)

For your case add like this

row(“Email”).ToString = “NA” Or string.IsNullOrEmpty(row(“Email”).ToString)

thanks :slight_smile: actually i did wrote the same code but i missed the ToString

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