Replace text in worksheet excel

I get the problem to replace a text “ABC” in excel worksheet with “XYZ”.
The word “ABC” can appear in any columns or rows in my worksheet.
Could you advise me how to replace them?
Thank you!

Have a Look Here

(From r In dtData.AsEnumerable
Select ia = r.ItemArray.toList
Select ic = ia.ConvertAll(Function (e) e.ToString.Trim.Replace(“ABC”,“XYZ”)).toArray()
Select dtCorrected.Rows.Add(ic)).CopyToDataTable()

LINQ query to update(replace)datatable in uipath - #8 by ppr

1 Like

@ppr Thank you so much, but I’m so new with UI path, could you give me more details on how to do it?

have a look on this demo xaml
Li_Pham.xaml (7.4 KB)

so readin data from excel
do the replacement (as it is done in the demo xaml)
write updated datatable back to excel

1 Like

I got it, thank you so much :smiley:

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