I’m trying to add two columns from excel into one using Dynamo that will form the sheet number. In the example attached I have tried to add them together but the values are off. What should read 8014 is coming out as 80.00000014. I’v looked at list.create & list.join but not finding the correct result.
Is there a simpler node to overcome this?
You can try to convert the numbers to string,add and then convert back to numbers.
Likely your numbers are doubles, not integers as this is how Dynamo usually reads data from excel. You’ll see the object type as a
System.Double or a
System.String data type. To force the string to convert the value without the decimal you need to convert to the desired type. You can do this with Python or a custom node, or you could use a Math.Floor node to do your job for you, which outputs an
System.Int64 data type. This sample graph illustrates this quite well:
Since the values are coming from excel, I would have expected them to be strings already.
Is the boolean for the “Read Excel” node set to “true” for “read as strings”?
You should also try to get rid of your null-values whenever possible.
Use Object.IsNull and the Boolean Filter to filter them out.