Hi all,
How to remove the from column city in excel file. Please check the below file.
test.xlsx (11.1 KB)
Please guide me on this.
Do you need to remove it after reading the file as datatable or in the file itself you need to remove it.
Hi @lakshmi.mp
Try this in Invoke Code
dt.AsEnumerable().ToList().ForEach(Sub(r)
r("Column") = r("Column").ToString().Replace("[","").Replace("]","")
End Sub)
Regards,
Hi @lakshmi.mp
Use For Each row in datatable
assign: row("City") = System.Text.RegularExpressions.Regex.Replace(row("City").ToString(), "\[|\]", "").Trim()
Hi @lakshmi.mp
You can use a simple
Read Range Workbook: read the sheet.
Use a loop For each ROw in datatable
use an assign activity:
CurrentRow("City")=CurrentRow("City").toString.Trim("[]".ToCharArray)
Write Range in same sheet or other one.
Here’s a sample xaml.
test.xlsx (10.2 KB)
Test.xaml (8.4 KB)
Happy Automation! ![]()
Hi @lakshmi.mp
Try below steps
- Use Read Range Activity
- Use For Each Row in Data Table Activity
- Take Assign Activity
CurrentRow("City") = CurrentRow("City").ToString.Trim("[]".ToCharArray)
Hope it’ll helps you ![]()
Cheers!!
@Sai_chnadrika_Kopparapu , thanks a lot for helping. It’s working fine
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.



