Count number of filled cells in an Excel column

Hello, I have an Excel database, in column A there is a list of items (datatable). The plan for robot is to go through all the items and do some process. But how do I tell robot, when to stop, when is the last filled cell (there are no epmty cells in between)? My idea was to count number of items and use Do - Loop, but don’t know how to get amount of filled cells in column A. I tried “datatable.Rows.Count”, but it counts all cells, including empty ones.
Another idea was to check, if next cell in datatable is empty or not, but neither this is clear for me how to do it. Could you please suggest? Thank you.

yah we can get the filled rows in a column with this expression which can be used
yourdatatablename = yourdatatablename.Select("[yourcolumnnam] <> ‘’ ").CopyToDatatable()

then you can use that datatable which will not have any rows with null value for the specified column

Hope this would help you
Cheeers @Majo

Hello Palaniyappan, thank you for your answer.

I probably do something wrong, as I get this:

I use: CoCdList.Select("[CC] <> ‘’ ").CopyToDatatable()


image

Can you please advise?