change the value of existing row belonginging to a particular column .and not adding data row.but changing existing value of a datatable
Here is a basic example on how to change the value of an existing row:
example.xaml (11.6 KB)
Calculate average of similar rows cell in Excel
Hi Thanks a lot.and also can you help based on if condition then I have to change the value of only those row.how can we do it?
You can use a For each row activity and then a If with your condition.
There are several examples in posts here. Just search “Filter datatable” or “Filter excel” and you will find plenty.
It depends on your condition really. For example you can check if the datatable is not null
isNothing(yourdatatable) first and then iterate through all the rows and have another condition with some other actions.
If you have a specific condition maybe I can answer more specific.
An even quicker method can be to use “DataTable”.Rows.IndexOf(“DataTable”.Rows.Find(“String”)) to find the first occurrence of a string. Removed the lengthy iteration through all rows. But I believe this only works if there was a primary key defined for the DT.