Updata Entire Column Data without For each

Hello Everybody,
i need to update a huge datatable (>20.000 rows) data column with a string variable

The case is

[Direzione del documento Numero del documento Tipo documento Data documento Data elaborazione Nome del soggetto emittente Nome del soggetto ricevente
Inviato 3510000001 Fattura 25/01/2022 26/01/2022 BETONTIRSPA CALCESTRUZZI S.P.A
Inviato 3510000002 Cessione di beni ammortizzabili 27/01/2022 28/01/2022 BETONTIRSPA CALCESTRUZZI S.P.A

Update all rows under column called “Nome del soggetto emittente” with an already string variable called str_society

With for each activity uipath take 30 minutes!

I think the solution is linq

Can you help me??

Hi @l.sambinelli

You can achieve via Invoke code

Have an look on the documentation


Refer to the thread for LINQ query @l.sambinelli


Thanks for the reply

This code is not usefull for me because
(From r In dtData.AsEnumerable
let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace(" ",“NA”)).toArray()
Select dtCorrected.Rows.Add(ra)).CopyToDataTable()

replace any spaces

in my case i need to replace a string with other string

This string change everytime.

its not about the replace (as we can adopt also to other functions), it is about the action on all columns

Selective data column approaches can be done, as described within the BLOG.

can you please share the screenshot of your current implementation. 30 mins is a surprising long running execution time

@l.sambinelli ,

Is the Column Value to be Updated be the same for all rows in the Datatable?

If So, You Could Delete the Column where you want to Update and then Add the Column Again using Add Data Column Activity with the str_society as the Default value.

This will update all rows of the Column with the same value.

If this cannot be done, For Each Row Should be better off or a Invoke Code to update the require column could be used.