I have a situation where I am scraping data from SAP (German Client) and when I download the amount it is like 98.765,78 I need to convert this to double so that this is necessary for other calculations.
I have tried these options to display in the log message
I get the following error
Log Message: Input string was not in a correct format.
Firstly you have to swap the dot with comma after that you can use Convert.ToDouble method
InProperString = 98.765,78
check this example
hope it helps
test.xaml (6.8 KB)
Hi @manjesh_kumar ,
Here is a sequence I have developed based on a similar thread which discusses this problem:
Basically, you have to play around with the CultureInfo to get what you want.
In this scenario, you are dealing with Portugal Numbers, so you have to implicitly specify what the formats are before referencing the Culture Info.
For that, first create a variable of type System.Globalization.CultureInfo and initialize it using this →
Next, use two assign activity like so:
cul_info.NumberFormat.NumberGroupSeparator = "."
This tells the robot all it needs to know about how to go about processing the given string.
After that is done, all that is left is to convert our string to Double →
ConvertDoubleFromPortugal.xaml (6.4 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.