@J0ska
i have any problem if the number have 2 decimal ==> example 120,05
but if the number is 120,503 it doesnt work
Sure, bcause it is thousands separator.
i need to keep this configuration system in my computer
As stated before it seems to be locale settgins conflict:
- your CSV is using comma as decimal separator
- your system is comma as thousands separator
I recommend you to resolve it by replacing “,” by “.” in your number, e.g.
MyNumber = “123,456”
MyNumber = MyNumber.replace(“,”,“.”)
This is a dummy solution but should work.
Cheers
Here an example of numbers with 2 decimal after coma
The solution proposed by @ppr before works well for all variants:
1 234,56 → 1234.56
234,56 → 234.56
234,567 → 234.567
1 234,567 → 1234.567
MyNumber = “1 234,56”
MyNumber = Double.Parse(MyNumber, System.Globalization.CultureInfo.CreateSpecificCulture(“fr-FR”)).ToString
Howgh
This is a different story - you read CSV into a datatable and seems you do not know how to apply the formula to the datatable.
Cheers
How can i do that ?
This is quite common topic. Many resources about this topic in this forum and Internet.
Search pls.
Cheers