DataTable cell values reading as object?

I saved a range copied from a google sheet to a datatable variable and am using a “For Each Row” function to go row by row through the variable (StudentData). It seems as if UI Path is associating typed data, such as a student name, as a String, while numerical data is being considered an Object. I’m trying to do mathematical calculations using the cell data, but I can’t do these calculations while UI Path is thinking of a number as an object. Is there a way to tell UIPath to read numbers in a datatable variable as a variable rather than an object? Is there a setting somewhere in which I can tell UIPath to always read a number in a datatable as a variable (which seems like it should be a default setting always) rather than as an object (whose purpose seems to me to be wildly infrequent compared to an object)?

Hi @Spencer_Johnson,

If the variable is object and it is a numerical value, you can assign it to integer.

intValue = CINT(objValue)

Regards
Ömer

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