How to replace empty data with specific string when Col A, Col B, Col C is empty

Hi all,
Below attached excel the highlighted part need to be replaced with keyword “Testing”.
how to do this help me.
Book1 test.xlsx (9.9 KB)
Sample file has been attached. Please look on it.
image

Thanks,
Lakshmi

@lakshmi.mp sorry for late, Now i saw your query.
plase use assign activity.
dt.AsEnumerable().Where(Function(a) a.Field(of string)(“put columns here”).ToString.Replace(“ ”,”Testing”).ToString).CopyToDatatable()

@raja.arslankhan ,
how to pass multiple columns in single assign.
If one column is empty then no need to replace.
if colA, col B, Col C are empty then need to replace.
image
How to do this.
Thanks,
Lakshmi

@lakshmi.mp
ok so please follow these steps
1-loop over datatable
2-put if inside loop
3- condition row.item(“Col A”).tostring is " " and row.item(“Col B”).tostring and row.item(“Col C”).tostring
4 put 3 assign activity in then block
5 for col A
left side of assign activity → row.item(“Col A”) and right side “Testing”
6 for col B
left side of assign activity → row.item(“Col B”) and right side “Testing”
7 for col c
left side of assign activity → row.item(“Col C”) and right side “Testing”

1 Like

Heloo @lakshmi.mp , Kindly refer the XAML file, You may got some idea
Forum_ExcelReplace.zip (81.4 KB)
It is based on Data table and out put write into seperate sheet or excel or overwrite

Happy Automation

Regards,
Gokul Jai

1 Like

@lakshmi.mp Also refer this flow based on excel application scope and write cell activity, It will directly write into excel sheets by looping the data table

Forum_ExcelReplace.zip (89.0 KB)

Happy Automation

Regards,
Gokul Jai.

1 Like

@lakshmi.mp was my solution not working??

Hi @Gokul_Jayakumar @raja.arslankhan ,
Thanks a lot for helping and providing the solution.
Its working now, thank you.

Thanks & Regards,
Lakshmi

1 Like

@raja.arslankhan ,
Was not replacing the values. Same blank cells were there.
Thanks,
Lakshmi

@lakshmi.mp how is it possible

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