Convert list of string to integer

Hi all,

I got concern on something. Lets say, if i got a column that stored a string of 1000kbps,3000kbps,5000kbps and 8000kbps. I tried to filter those string in one single column but it seems like it is not working. Whats the best option on how to solve this. I was thinking about converting those string into int32 first and then try to filter those column with anything thats greater than 1000 kbps only. Can you help me out please.

@hairil.hashimie As per my understanding you want to filter a column value which are gretter than 1000kbps. On that note first you need to split your column into 1000 int and kbps string then filter and again merge the value with kbps.
For split you can either use split or regex function.

HI @hairil.hashimie,

Try this
strVar = "1000kbps,3000kbps,5000kbps,8000kbps,500kbps,300kbps"

  • Create a integer array variable arrVar int
  • Assign the below code
    arrVar = Array.ConvertAll(strVar.Replace("kbps",string.Empty).Split(","c), Function(n) Integer.Parse(n))
  • Again create a another variable arrVar2 int as int array and assign
    arrVar2 = arrVar.Where(Function(n) n>1000).ToArray()

Thank you first for your help. I have done your guide. But in instant with that, how can i applied this into excel application scope. Where i need to filter this in specific assign data table? Of which activities are best to be applied this variable. Try out filter datatble and assign this but it just print out my table headers only. Sorry as im still noobies in uipath.


I don’t understand your requirement give some sample data

1 Like

Lets say if i got a column like this and have values range from 100Kbps to 800Kbps. How can i use your method to filter out values that only range from 500Kbps to 800Kbps. Using the filter data table activity seems like not working.


And if lets say while it filtering the whole column cell and it find empty cell how can i proceed to the next cell that fill with certain values without stopping the whole process of extraction?

Try this…


Check the below code

dtOutput = dtData.AsEnumerable().Where(Function(c) Convert.ToInt32(c.Field(Of string)("HSBA_DOWNLOAD_BANDWIDTH").ToLower().Replace("kbps",string.Empty).Trim)>1000).CopyToDataTable

Thank you man for your help and responses. Appreciate it.

Thank you man for your help. Managed to get it works. Thank you and much appreciate it.

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