Hie guys.
I have an excel with 2 columns name and age. with age having details like #A20#, #A3# etc. i want to trim characters on age leaving details which are in between A and # for example #A20# will be 20. what i have done so far is
-read range and used for each row
-used assign row.Item(1).toString which is age column
-txtvalue.Substring(1,4) to trim
My question is is there any way fast to trim the details because its taking too long for 200 rows. and also how can i write the value i have trimmed on that same cell. TRIM.xlsx (7.9 KB)
If it is in a datatable, you can do a regex to get only the digits (if you are sure that the digitswill always be the age, nothing else). Add an assign activity in a βFor Each Rowβ loop:
Assuming your original datatable is called originalDT.
In a first assign, set newDT to originalDT.clone().
Then in a second assign, set new DT to originalDT.AsEnumerable.Select(Function(x) modifiedDT.LoadDataRow(New Object() {x(0), x(1).ToString.Split({β#Aβ,β#β}, StringSplitOptions.none)(1)}, False)).CopyToDataTable
This also assumes name is in your first column, and age is in the second