I need take a currency value from a web page using Get Text Activity and then save this value in a variable, but what type of variable save the currency value ?
If I save that value $41,40 of type System.Double, then when I run show me an error.
how can I solve this ? anybody can help me ?
I hope any reply.
You can save the contents of a Get Text activity to a String. Then if you want the double value you’ll need to clean the string up so that it is a valid double. “$41,40” is not a valid double, but “41.40” is.
you cannot convert string to double just like what @DanielMitchell said remove first the string int the currency in order for you to convert the string value to double.
Hello @DanielMitchell ,
I remove the currency, but now how I can convert the string value “41,40” to double ?.
That I need to do.
You can do
Double.Parse(myString.Replace(",",".")). This replaces the comma with a period and then parses that value as a double. Use this on the right hand side of an assign activity and put your double variable on the left. Replace “myString” with whatever your variable is actually called.
Thanks @DanielMitchell !
Your solution it works !