if the excel rows are null in the same row print the manual in the column of status
like this
if the excel rows are null in the same row print the manual in the column of status
like this
In if(row(“num2”).ToString.contains(“”)
Print or write cell status as manual
Thanks
Ashwin.S
Use for each row in datatable activity to iterate the each row in datatable.
Write an If condition (If Activity) that
string.IsNullOrEmpty(Currentrow(“num2”).ToString) and string.IsNullOrWhiteSpace(Currentrow(“num2”).ToString)
In then block use the write cell activity to write the “Manual” in the cell in Status column.
Hope it helps!!
Read Range.
Loop through the DataTable
if String.isNullorEmpty(currentRow(“num2”).toString)
then
currentRow(“status”)= “manual”
This is psedocode fro you.
Thanks
In these scenarios, if you are dealing with ForEach activity for this, it will consume a lot of time. Instead, just use the following query in the Invoke activity to get the result in seconds:
yourDt.AsEnumerable.ToList.ForEach(Sub(row)
row("status") = if(row("num2").ToString.Trim.Equals(String.Empty),"manual",row("status").ToString)
End Sub)
Hope this helps,
Best Regards.
This is false. Linq still loops, it’s just hidden from the user and can actually be slower because it uses more system overhead. It’s a myth that For Each is slower.
I clearly see a point of using For Each when you have to deal with 30+ columns, 30K data & For Each looping around the entity just to update a column that simply has logical interdependency on another column.
We ran across situations where we had to deal with Large set of data
& For Each was just not the optimal way. Thanks for the input.
Hi @krishna_priya ,
Try the following VBA script:
Sub UpdateManual()
For Each C In ActiveSheet.UsedRange.Columns("B").Cells
If C.Value = "" Then Range("C" & C.Row).Value = "Manual"
Next
End Sub
Regards,