If excel cell empty

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!

Hi,

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

https://forum.uipath.com/t/remove-empty-rows-in-the-data-table/21663/3?u=saranyakishore

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:

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