Excel column need only number

Hi,

Quantity Rate
100 Qty 310.37
50 Qty 84.93
4 Qty 49.97
17 Qty 13.5

i have excel like this i want to remove Qty from Quantity Column. i need only number like below for your referance. give me solution screen shot.

Quantity Rate
100 310.37
50 84.93
4 49.97
17 13.5

Thank you

@MD_Farhan1,

Use this LINQ in invoke code like this

dtInput.AsEnumerable().ToList().ForEach(Sub(row)
row("Quantity") = row("Quantity").ToString.Replace("Qty", "").Trim
End Sub)

1 Like

Hi @MD_Farhan1

Use this workflow


System.Text.RegularExpressions.Regex.Match((CurrentRow("Quantity").ToString), "\d+").Value

Hope this helps!

1 Like

after invoke code again i want to process write activity?

@MD_Farhan1,

If you want the data in and excel file then yes, use Write range activity and pass dtInput to it.

1 Like

@MD_Farhan1


You can use For Each Row in Datatable activity and inside Assign Activity

CurrentRow(“Quantity”) = Cint(CurrentRow(“Quantity”).ToString.Replace(“Qty”, “”).Trim)

Then you might use “Write Range” activity to write it to excel file

1 Like

Thank you for your Effort :ok_hand:

2 Likes

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