Hi Guys,
I need you expertise with the following, let´s say I have an excel file with several columns and I need to enter row by row (entire row at once) into a web page if 1st column = “copy” . The thing is that web app has not identifier in rows, but the rows order of web app is equal to excel rows order.
I send a screenshot of the data. Can someone help me out?
hello @Paulo_Martins
here is the some try catch solution.
get “for each row” then find the “currentRow(“FirstColumn”).tostring=“Copy”” in if condition if copy string finds then enter the data in webapp else put only enter or something which skips the row from web application.
hope it helps.
Can you share a reference image of your WebApp so that we can have an idea on it.
Regards,
Vasanth
then check for the following:
- for each row in datatable, configure the index output
if: row is to copy- Enter values, use information of index e.g on attributes like tableRow. Maybe some offset corrections are to do.
Kindly note: this is an initial strategy which is now to crosscheck on the details (Structures, Selectors) in a next step
Hi @Paulo_Martins ,
Use for each row in datatable to loop each row.
Inside for each use If activity with following condition:
currentRow(0).ToString.Equals(“Copy”)
Then: Enter into webpage using index of for each row in datatable activity.
Else: Nothing
Hope it helps.
Use inside activity “for each” in that provide “yourdatatable.columns”
and then you can manupulate for each item in row using columns name.
Can you please detail this step?
Check this:
Inside the Then part of If activity, you can use Type into activity to write it into the webpage. In selectors of Type into , you can use Index variable (Shown above) to enter into right row in the webpage.
Please refer the below xaml file, i’ve created a skeleton outline, you can modify use application/browser and type into activity accordingly,
Excel.xaml (15.5 KB)
Thanks man, but I want to copy the entire row at once, and not column by column.
Thanks, if understood correctly I can use a Type Into inside “Then” condition. But what should I have inside the “type this” field of the Type Into activity?
Note that I want to copy the entire row at once.
You can use multiple Type into to enter each column data.
For example: currentRow(1).ToString
In first iteration this will enter 334 (In reference to the image you have shared)
where 1 is the column index.
if you want to copy the entire row then you need to create a string variable, and use assign activity in the Then Container
in the set value field give as = currentrow(0).tostring + “,” + currentrow(1).tostring + “,” + currentrow(2).tostring
if you want a space inbetween them replace “,” with " "
Regards,
Vasanth Kumar
Perfect. How can I do to have a dinamic selector that will change row in the web app according the index row of the datatable? This is, the row selected in the web app should be equal to the row index of datatable.
You can use same selector, but instead of tableRow=‘21’, make it tableRow = ‘{{index}}’
where index is the looping index variable from for each row in datatable activity as shown in my previous post.