How to round up all values in a table

Hello my friend, here is a screenshot over the very simple sequenc I am trying to do. All i want is to move the values from col a to col b, but remove decimals in the process. Do you understand this error message? It is driving me crazy haha, thanks for all the help!

Hi @hcondoesrpa,

The error means that the string you’re trying to parse an integer from doesn’t actually contain a valid integer. What code are you using? The same I gave you? Also can you give me a example of a number you’re trying to process?

1 Like

So, I tried to show you in Excel what my goal is:

On the right side of the Assign bow, the code which you cant fully see is:

Math.Round(Convert.ToInt32(row(“Termin1”)))

The error i recieve is: “Assign: Input string was not in the correct format.”

1 Like

Rmundro, perhaps you have an email I could send you zip file with excel sheet and my uipath main? I tried to upload here but my account is new so I cant do that yet :frowning:

1 Like

@hcondoesrpa,

]Sure, send it to my. I will help you out. :smiley:

Fine
Hope these steps would surely help you convert to the nearby whole number
—use a excel application scope and pass the file path of excel file as input
—Inside the scope use a READ RANGE activity and get the output with a variable of type datatable named dt
—now use a FOR EACH ROW ACTIVITY and pass the above variable as input
—inside the loop use a assign activity like this
row(0) = Math.Ceiling(Convery.ToDouble(row(0).ToString.Replace(“,”,”.”))).ToString

Then next to this for each row activity use a WRITE RANGE activity where mention the input as dt and enable Add Headers property

Cheers @hcondoesrpa