Conversion problems

Hello,
I have a data table extracted from an excel file. Then I use Get Row Item to get a value from a certain position of this data table.However, there are a few columns in the data table where i get this error:

Any ideas on what might cause it?

Thanks.

Hi @GeorgeIst,

It usually happens when the excel column contains numbers and UiPath originally recognize it as Double, but if you want that it’s converted to string, you should just use the .ToString method. Please try it and let us know.

The following code would work as well:
row.Item("DoubleColumn").ToString

3 Likes

Hello,

The thing is I should find a way to convert the data from double to string before i use the Get Row Item activity. The error occurs when it tries to convert the double data to string.

Thank you.

Hey @GeorgeIst

Just Change the “Get Row Item” Activity output datatype to “Generic”.

You can try this sample workflow and let me know :slight_smile: in case of any doubts or problem

Sample.xaml (8.6 KB)

Regards…!!
Aksh

1 Like

Hello,

Thanks for all the help @aksh1yadav. It worked that way but to make it work i had to delete and recreate the activity. It seems that once you set the first variable into the GetRowItem activity you can’t use it with variables of a different type than the initial one.

Have a nice day!

This is a caching issues. When you changed Data type or scope of any variable then you will get this. just clear that filed or variable and hit ctrl+save then again use the modified variable with ctrl+space. it will work and will not show error.
You do not need to delete it.

Regards…!!
AKsh

3 Likes

I get it
Thanks man!