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

excel
readrange

#1

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!


#2

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.

Regards…!!
Aksh


#3

Hi,
Have you been through this awesome training yet.
It’s free.
The world’s first open online training platform for RPA users.
https://academy.uipath.com/lms/index.php?r=site/index

Happy Automation
Cheers :slightly_smiling_face:


#4

How do you then convert that data to an integer?


#5

Regards…!!
Aksh