How to use read range function to get integer value from excel

Hi there,

I am trying to read a cell in an excel sheet with integer value to do conditional analysis.
However, i keep encountering the error below:
Operator ‘>’ is not defined for type ‘System.Data.DataTable’ and ’ Integer’

Please help!

To read a cell please use **Read Cell ** activity. and pass the column with cell index.

This is because read range will read the range of an excel sheet and it will always return you datatable not a single value.

So you should use Read cell activity instead of Read Range.

Note - After get the data from Read Cell just confirm the data type of that, if it will be Generic then convert that into int then use logical operators on that.


1 Like

Have you been through this awesome training yet.
It’s free.
The world’s first open online training platform for RPA users.

Happy Automation
Cheers :slightly_smiling_face:

How do you then convert that data to an integer?