Check if excel file is empty?

Hi,
I would like to check if a cell in an excel sheet is empty or not.
So I’m using an read cell activity to get the string of the cell, and then I’m doing: strVar.IsEmptyOrNull("").

But this is not working, anyone can help?

Hi @jadbenn,

Use this,

String.IsNullOrEmpty(strVar)

As a condition in If activity, now place messageBox specifying the cell is Empty in Then section and one messageBox in else section specifying the cell isn’t empty. that’s it.

Is tricky because we dont know the type of data you have there… It could be like
Convert.ToString(row("ColumnName")).Length = 0

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