How to split and create a new Coolum

hi
i Have a county name and a code and some thing some letters or numbers
i need to spit and create a new coloum call code as shown in the 2nd excel
how can i write for each row


Result.xlsx (10.6 KB)

Heres a sequence that does this
Tester.xaml (8.5 KB)

  1. read result.xlsx
  2. add new datacolumn
  3. loop datacolumn, assign System.Text.RegularExpressions.Regex.Match(row("CountryCode").ToString,"([\d]+)").Groups(1).Value
    to row(“Code”) (this just means assign the numbers from CountryCode column to the “Code” column
  4. write new datatable

result
image

1 Like

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