I have column with mixture of Integer and Text values, i need to delete only text in a row and keep integer rows, how can i do it?

I have column with mixture of Integer and Text values, i need to delete only Text values in the row and keep integer values, how can i do it ?

give a try on

  • For each row Activity | row in YourDataTableVar
    • Assign Activity: row(YourColNameOrIndex) = System.Text.RegularExpressions.Regex.Match(row(“OrderNumberValue”).toString,"\d+").ToString

Hi @Sudhir_P

In addition to method mentioned by @ppr

you can use variable.IsNumeric in IF condition. It will return a Boolean, if value is numeric it will be True else False

then you can use write cell activity to delete if it is having text values as per you need

Hope this is helpful. Mark solution if this answers the question so it will be helpful to others

thank you for your reply, but i’m getting error at assign activity,
Error: match is a type in regular experssions and cannot be used as expression

please show your imp / coding statement. Thanks

Excel - Remove Text from column.xaml (7.7 KB)
SampleData(1).xlsx (66.0 KB)

@Sudhir_P
issue is code should be like this

System.Text.RegularExpressions.Regex.Match(row(YourColNameOrIndex).toString,"\d+").ToString

Excel - Remove Text from column.xaml (9.0 KB)

Regards,
Nived N

System.Text.RegularExpressions.Regex.Match(row(“OrderNumberValue”).toString,"\d+").ToString

we do need

thank you very much, it’s worked.

thanks for your help.it worked

1 Like

thank you for your reply.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.