Lost of comma when convert string to number

Hi everyone.
I work on my first project on dynamo.
I try to import values to new share parameter, from Excel to Revit 2017.
When I convert String of my list to number, I lost commas in the numbers…
How can I conserve it ?

Thanks,
All your topics help me everyday !

Convert to text in Excel before importing it. The comma in numbers in Excel is a formatting option rather than a ‘real’ character

Thank you for your answer. But it didn’t work…
I try to cenvert (in excel) number/text/standar but no change…
Any other ideas .?

Not totally sure but I think I’ve solved this through the regional settings in Windows config’ (Region and Language / Additional settings)…

As mentioned it’s a number formatting option in Excel. The only way to preserve the comma is to keep it as a string. Or check to see if Revit can store numbers with the same formatting as Excel (note that if you can, the comma obviously won’t appear/matter in Dynamo).

yeah I try it too.
But I just can replace “,” with “.”.
But dynamo use alway “,” in his list system.

Hum whatever the changment in Excel…
It’s didn’t work with Dynamo.

Maybe I can put the comma after the conversion “String.ToNumber”.
Something like nnnnn x 0.001 = nn,nnn.
How can i try it ?

Thanks guys

Just use String.Split and then String.Join :relaxed:

hi,

Didn’t work too…
I used a coef = 0.001 for create the decimal.

thank everybody

It works perfectly:

2 Likes

@Yna_Db this is just a workaround for a bug in the String.ToNumber Node. IMO String.ToNumber should work with comma separated values as well.