Adding null condition in Data Table

Hi RPA Devs,

I have a problem, i want to get all the value from the excel and transfer it to the data table however i want to put a condition that will not get the value of the row if it is equal to NULL or “”.

I keep getting an error. NullReferenceException.

Hope someone can help me with this.


Thank you.


Hi @Cedrick_Julian,

where you are getting the NullReferecenException, during the condition check UnappliedBalance.Equals(“”)?

what is the UnappliedBalance variable type?

Hi, I had a similar issue but fixed it by using a select on the datatable to only get the rows I want, for example

RFCDT.Select(“UnappliedBalance<>‘’ or UnappliedBalance is not NULL️”)

You then get an array of datarows that you can iterate over or make a new datatable.

hi @Cedrick_Julian

you can check it with this

if(UnappliedBalance.IsNull orEmpty)

Ashwin S

Hi Sir Bob,

Wow, Just amazed that you are very hands-on on this.

Thank you very much Sir very much appreciated, we will apply this suggestion and will let you know.

Thank you.



1 Like

Hi Sir Ashwin S,

Thank you for the help, very much appreciated.

will test this suggestion too.


Hi @Cedrick_Julian,

check in if condition string.isNullorEmpty(yourvalue)

Regards, Arivu:-)