Round numbers and join text in the same row

I’ve come so far to join to text string in one row.
But having problems with the rounding and zeros.
After exporting to Excel I get number like 90 000 000, 38 000 000, etc…
What I wont to achieve is to get 90, 40 ( not 38).
I tried Math.Round+ (Clockwork), Math.Round but it seems that I’m not getting anywhere. Even thou
Can some pleas point me to the right direction.


You can set the excel column to integer. Did you tryed this?

You can also round your double values and than create strings and export them to excel.

No I didn’t .
I don’t know exactly what do you mean by setting column to integer?
I’ve rounded values from two elements , joining them in one column is trickier as I expected…
I’m lost;)

you might want to convert the numbers to a string
Springs.Number.ToString will round and convert to a string in one step

1 Like
  1. Change the format in excel (sorry for germn picture)
  2. round double and export to excel works for me:

    But if you have a string you can remove something from it.

Thanks for the ideas: Ill tried but doesn’t do the job I want;)
This script work fine only thing is rounding. Probably I’m doing something wrong from begining because anywhere I palce Math.round the script doesnt work! !
This is the script:

and this is out come:

and expected outcome!

The image you posted of your graph isn’t legible. Try using the export workspace as image button (#6 in the second screenshot here) after zooming in so you can easily read the node names and previews.

Oh yes

Can you wire an ‘Object.Type’ node in after the a+b code block, and expand the preview for it and the a+b code block?

Math.Round isn’t helping as your values are text, not numbers at this point. My guess is that the ‘ang’ parameter is text ;the other values have a floating point so more likely doubles). So let’s clean up some strings.

Add a String.Split node after the a+b code block. Use a “,” as your delimiter. Then use a List.FirstItem node with longest lacing to pull out the first value from each sublist. Wire that into the List.AddItemToFront and you should be all set.

Thank you for the reply.
I thing I dont get it. I dont understand “with longest lacing”.

Second thing. “Ang” and “Angle” they are both numbers (in Revit they signify angles)

If its text then I should convert text to numbers.

Lacing is how Dynamo deals with replication. Check the Dynamo Primer for more info, but basically every node you have is set to ‘Auto’ lacing. You need to get the first item from each sublist, so by using longest lacing you accomplish that. Right click the node, in the lacing option choose ‘longest’.

Once you’re in excel the data is transferable to a number. Changing the data to a number in Dynamo is extra steps.

Great it works and thanks for the explanation!

Thats exactly I would like to avoid - extra steps in Excel. If its to complicated in Dynamo then I prefer to do it in Excel.

Thanks again!