I am trying to replace all string text with the number “0” in a column of numerical values. However, when I set up the activities in Studio X it changes the whole column to “0” because it does not recognize the employee i.d’s as a numerical values. How do I fix this?
After reading the Excel, you loop on the DataTable.
While looping, add an If condition to check if the current column is numeric or not. The condition would look like this:
IsNumeric(CurrentRow(“Employee ID (NUMBERS ONLY”).ToString)
Then you can add theSet to Variable activity to set the value to 0.
I have also attached a sample code for your reference.
Hope this helps.
ReplaceNonNumeric.zip (58.0 KB)