How to read a variable from a data file as number/int/double?

I defined a variable as number and used it as int in a keyword in a test case.

When I’m trying to execute the test case in a test suite and read this variable from an excel data file, the following error shows up:
No signature of method: function() is applicable for argument types: (java.lang.String)
Possible solutions: function(int)

It seems that variable is read as String.
Since I need to use this procedure for many variables in test data, I would like to avoid using a parsing method every time. Do you have any suggestion get variables from data file as int/double/number (anything but String)?

Try as Integer:

int x = function("5") as Integer

According to my tests, it’s impossible.
You can use function(yourVariableName as Integer), or change the method with String argument, and parse the String as int inside the function