Uipath output Dataset Clean

Dear all:
Currently after I have done some data selection for my file, I output a series of data that is like this:
image
We would have some : , and Blank Space. What moduel should I use to do dataclean in UiPath to clean the datatable?

@Raymond6

in assign

inputStringVariable = inputStringVariable.Replace(":", "").Replace(",", "").Replace(" ", "")

cheers…!

1 Like

You have the first row empty, and thats why its just showing “,” , you can remove the empty rows to get rid of them. To remove the “:”, you can either use a Linq expression or loop through each rows and replace “:” with empty string.

Hello Sai:
If my output data is already input in datatable, what would be your suggestion?

@Raymond6

you can use invoke code or Linq

can you share the sample input

Give try at the following

Assign Activity
dtCleansed = dtOrig.Clone

Assign Activity
dtCleansed =

(From d in dtOrig.AsEnumerable
Let chk = d.ItemArray.All(Function (x) isNothing(x) OrElse String.IsNullOrEmpty(x.ToString.Trim))
Where not chk
Let ra = d.ItemArray(Function (s) s.ToString.Trim(": ".ToCharArray)).Cast(of Object).ToArray
Select r = dtCleansed.Rows.Add(ra)).CopyToDataTable

we used:
grafik

Nevermind, I have tried to apply this code to every rows that I have and it works. Thank you very much!

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