If excel cell empty

datatable
excel
uiautomation
activities

#1

Hi All,

Currently I am using a read range for excel with the range parameter set to : “”.
Then, I use a for each row to take the item needed.
However, when what I need to automate it is done, the robot continued and show an error.

How can I stop the automation for each when the next cell is empty?

Thank you!


#2

Hi,

If an entire row is empty, you can remove empty rows in the datatable. Please refer the link.


#3

I had this problem… I ended up just using a try catch, and checking the error message in the catch for the one that means the cell was empty :woman_shrugging:


#4

Hi - Within for loop use if condition and check [DataTableName].Rows.Count > 0 and do the operation to avoid this error
image

Thank you,
Nitesh