Read every cell in a excel sheet and check the value

Hello Uipath world !

I have a question about excel automation.

In my case, I have a excel sheet for closing check and my goal is to make sure that every cell in the range C3:FO40 contain only the value 0, or else I have to count the number of cell that contain something else.

I think I have to go through every cell for each row but I’m stucked.
How could I do that?


Hi @WilliamC

Use read range and mention the range and use for each row in Datatable

use if condtion as row(“ColumnName”).ToString.contains(“0”) in else use dt.rows.count

Ashwin S


Try with Filter datatable for the 4 columns (C,D,E,F). then count the Filtered Datatable.

Thank you for answers.

There is issue in my case which is, the range is really big ( C to FO ), so I don’t think it is really reasonable to use the column name or else I’ll have to do it 100 times.

How could I do it more easily?

Maybe: for each row of the datatable and then use this approach: to get Max and then I assume you could do similar to get the Min. If both max and min are 0, then every entry is 0.

Thank you very much !

It worked for me to catch errors, even thought I still don’t know how I could count the number of cells that don’t contain 0 as value.

Nevertheless, I can detect error for every row.

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