In my excel sheet i have a column in which some values are negative.How will i convert all those -ve values into 0 without changing other entries.
Welcome to the community!!!
Follow the below steps
- use read range activity to read the data in the excel to a datatable
- Use a for each row activity to loop through the datatable records
- In the loop, use an IF activity to check whether the value is minus or not.
Int.32.Parse(row(“ColumnName”).ToString) < 0
If true, then update the value in the row
row(“Column Name”) = (Int.32.Parse(row(“ColumnName”).ToString) * -1).ToString
- Now, write the data back into the excel using Write range activity
Hi @Soniya215, Welcome to Uipath Community
As @Lahiru.Fernando said clearly, crispy.
I’m just adding the example below.
Happy Learning !
what if the values in table are in decimal number
@Soniya215 You can use
Thanks for your help.It worked sucessfully.
Send me work flow bro