I need to replace Text in excel . There are 32 colums with header and 1000+ rows with values. If Value contains “Milestone” i need to replace with “Yes”.
Complete Datatable i need to find and replace for following.
(From r In dtData.AsEnumerable
let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace(“Milestone”,“YES”)).toArray()
Select dtCorrected.Rows.Add(ra)).CopyToDataTable()
Here DT in the Input Datatable, OutputDT is the Datatable variable which needs to be Initialised with the Clone of Input Datatable DT before using the above Expression.
For this Particular Case, we could also Try with a Regex/String Replace Method, where we First Convert the Datatable to String, Replace the String "Milestone" with "Yes", then use Generate Datatable Activity to Convert the String back to a Datatable.
As it is a Mass Update, it shouldn’t be a problem.
for c# it is usually to use x => x syntac for the VB.Net Function (x) x equivalent
we also have to respect the propert syntax (case sensitive, () cannot be ommited)…
On the end we do close with a ;
It could be the case that there is a confusion for current UiPath .Net Infrastructure and LINQ Query syntax.