Hi All.
In a excel i have balance column
₹123.45
₹234.67 like this
I need to change only rupee symbol to dollar symbol in uipath not the value how we can do that?
Can you please suggest some answers
Hi All.
In a excel i have balance column
₹123.45
₹234.67 like this
I need to change only rupee symbol to dollar symbol in uipath not the value how we can do that?
Can you please suggest some answers
Welcome to our UiPath community.
First use Read Range activity to read the data from Excel file and it will give output as DataTable. Let’s say dtInput.
And then use For Each Row activity to iterate one by one row.
For Each currentRow in dtInput
currentRow("balance") = currentRow("balance").ToString.Trim.Replace("₹","$")
Finally use Write Range activity and pass above dtInput to write back into the excel file.
Laxman i have tried your solution but not getting actual result
(From r In DT_Data.AsEnumerable Let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace(“rupee sympol”,“$”)).toArray() Select DT_Data.Rows.Add(ra)).CopyToDataTable()
it will work, lets try this
Hey @317-Hemalatha_G
When you read it from Excel into a Data Table are you getting the rupee symbol along ?
Thanks
#nK
Can you please print the balance column values and share the screenshot here.
Hey @317-Hemalatha_G
Kindly try the updated query below,
(From r In DT_Data.Copy().AsEnumerable Let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace(“rupee sympol”,“$”)).toArray() Select DT_Data.Rows.Add(ra)).CopyToDataTable()
Thanks
#nK
i have a doubt in that r we have give like this Row(“Remaining Balance”)
Hey @317-Hemalatha_G
In that code snippet, the replace is actually done for all columns !
Thanks
#nK
Hey @317-Hemalatha_G
The error source here seems to be on For-Each Row
, guessing it’s not due to this statement.
Thanks
#nK
pin your xaml i will solve it
Sub Macro1()
’
’ Macro1 Macro
’
’
Cells.Replace What:=“$”, Replacement:=" ", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
you can also use macro for replace
Hi Veera_Raj i will place my xaml file and also output file over here
Sequence.xaml (37.4 KB)
Lurie.xlsx (6.1 MB)
i have gone through your excel its column data type is currency in your excel thats why whenever you try to replace its not working
newseq.xaml (7.1 KB)
its working fine use it