Hi All,
Good afternoon.
Can anyone help me to do the subtraction operation in uipath.
i.e I wanna subtract two different column in a excel and write the result in another column.
Column3= Column1-Column2.
I am trying like this:
Reading excel file(DT1).
Passed the DT1 in for each loop.
Get row item(Column1)
Get row item(Column2)
In an assign activity I am displaying the output like Column3= Column1-Column2
but I am getting an error like in the attachment.
Please someone help me on this
Inside the loop assign
Currentrow(“Result”)=Cint(currentrow(“Credit”).tostring)-Cint(Currentrow(“Debit”).toString)
4.Outside the loop write range Dt1.
there are severeal things to check and maybe to adopt
crosscheck if name or index is properly used for referencing the column
after opening the xaml we saw:
(maybe an opening issue on quick review)
and do see following when click on Name
give a try on Cint(“0” & Credit.toString) - Cint(“0” & Debit.toString)
In general:
using assign activity for getting row’s col value like below allows us to get more control on what we get as the variable type is set by us and the retrieval statement is done by us:
Just start with these modifications and lets see what you will get on next run
0-3790 string is not value that can be converted into an int. So your data quality is not on a state that the impementation can run or there is a bug in the implementation that creates this string
we can convert 1,2,3 …100 but not number-number …
Issue occured on this part: Cint(“0” & Credit.toString) - Cint(“0” & Debit.toString), right?