ani_panch
(ani panch)
April 20, 2023, 10:32am
1
Hi guys! I’m working on web form automation i.e. want to input data from excel into a web form. I have a data like this in this column:
and only want to input the USD and price part in the form field, leaving out the “paid” word. How do I parse it?
Jithesh_R
(Jithesh R)
April 20, 2023, 10:41am
2
@ani_panch ,
USe a for each row activity for the input excel and inside the Loop
2. Use assign activity and provide
RequiredValue= Split(CurrentRow("paid").ToString,"Paid")(1)
Then you can type into the output
USD
528.00
Regards,
5 Likes
ppr
(Peter)
April 20, 2023, 10:43am
3
Hi @ani_panch ,
You can try this also, you will get array.
arr[0] would be USD
arr[1] would be amount
Thanks,
1 Like
Hi @ani_panch ,
Maybe the Split can be done based on the New Line and retrieve the 2nd and 3rd Split like below :
values = Split(CurrentRow("paid").ToString,Environment.NewLine)
Then for accessing the Currency and Amount we can use the expression below :
values(1) //Accessing the 2nd Split item Currency
values(2) //Accessing the 3rd Split item Amount
Here, values
is a variable of type Array of String.
Also assuming that you are familiar with the For Each Row
activity and have already read the data as a Datatable.
Let us know if this is not working as expected.
1 Like
ani_panch
(ani panch)
April 20, 2023, 11:53am
6
Thanks it worked well, I used it for each row datatable activity tho
system
(system)
Closed
April 23, 2023, 11:53am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.