I am facimg this error If: Object reference not set to an instance of an object


this is image A1value is Null B value is Number check the condition put the colour. i was gave this condition in IF activity…“IsNothing(CurrentRow(“BUTERFLY”)) OrElse String.IsNullOrEmpty(CurrentRow(“BUTERFLY”).ToString.Trim)”…after run the bot i am getting this error. but some BUTTERFLY coloumn is NULL.

Hi @VENKATESH2

Can you try this

String.IsNullOrEmpty(CurrentRow("BUTTERFLY").ToString) Or String.IsNullOrWhiteSpace(CurrentRow("BUTTERFLY").ToString)

Regards,

same error throwing. please give another one

Hi,

If possible, can you share screenshot of the IF activity and the expression?

Regards,

Hi,

Can you try the following expression?

CurrentRow("sample") is Nothing OrElse String.IsNullOrEmpty(CurrentRow("sample").ToString().Trim()) OrElse CurrentRow("venky") is Nothing OrElse String.IsNullOrEmpty(CurrentRow("venky").ToString().Trim())

Regards,

Hi @VENKATESH2

Try using this in if condition

Currentrow(“sample”).tostring=“” or Currentrow(“venky”).tostring=“”

Hie @VENKATESH2 are you trying to paint on that cells which are empty in the excel
if yes can you check this

finally your output


cheers happy automation