Converting Generic to Double

I am struggling to convert Generic data types from Generic to double so that I can then round those numbers. I am bringing the values in using a ‘read cell’ tool for excel. I have tried the following:

But I get this error for the formula.

image

Thoughts on how to fix this?

Hi @Horne11,

Can you try putting this in the default space
Convert.todouble(F2_1.tostring)

Best Regards,
Santosh Pothina

That works! However, when I try and use that variable in a ‘Set Bookmark Content’ tool I get the following error:

image

It is expecting a string there but we are using double type variable… Put .tostring next to the double variable…
Just a type casting issue.

Best Regards,
Santosh Pothina

Thanks. So ultimately what I am trying to do is convert it to double, round to two decimal places, and then convert back to string in order to use the ‘Set Bookmark Content’ tool. I have converted the Generic to double, rounded, and then converted back to string but I am getting the following error:

image

Here are my variables below. Maybe its an issue with the rounding?