IF statement not working with "is empty"

Hi,

I’ve created a bot to get everything in an excel file and save to a table. I’ve then created a condition that if an element in that table is empty it adds a value to a constant variable.

This is not happening and it is instead taking the empty as a space and conducting the “then” statement. I’ve tried changing the If to “equal ’ '” but this also goes to the “then” option.

If you want to check is a String is null, you use

if (s == null)
If you want to check if a string is the empty string, you use

if (s.equals(""))
or

if (s.length() == 0)
or

if (s.isEmpty())
An empty string is an empty string. It’s not null. And == must never be used to compare string contents. == tests if two variables refere to the same object instance. Not if they contain the same characters.

@svarela1a if the cell is empty, does the bot need to perform Else part of the script?