I have an issue with extracting data from excel and writing it in web elements.
I want to create a costumer order in SAP Fiori and it works perfect when I try to enter the details for the first position. After that I want to enter the second position, but this is where the problems start.
I only want to enter the details for the second position, which are in the second row of my excel file, but since I use the activity “for each row” it tries to go to the beginning of creating the costumer order. When I try to set my “type into” activities outside of the “for each row” activity, it doesn’t recognize the expression “row.item(“Material”.ToString” I use for the type into activity.
Thats how it looks in SAP.
If you have an idea how to fix this issue, pleace let me know!
According to your description, I wonder why the Type Into must outside of the For Each Row.
Maybe you can create the costumer order outside of the For Each Row, and set Type Into activity inside that.
Or provide us your source code then we can find out the solution for you easily.
hello @djung ,
As per your post what I understood is " You have an excel with different rows of data, you need to loop through each row and need to insert it to SAP". Correct if the understanding is wrong.
In this situation plz do the below steps:
- Read the Excel and get the output to a DataTable. Use Read Range activity
- Use For Each Row In DataTable activity to loop through each row of data
3)Do the steps to write the data to the SAP( Use Type Into activity to write the data which you are getting from Excel)
So for each iteration it will perform the same action, that is getting the row data from Excel and writing the data to SAP
Thank you for your replies!
I think I didn’t explain my problem very well, I’m sorry for that.
Before the step you can see inthe picture above, I already opened the browser and am now clicking on UI elements inside the already opened browser - so far so good.
After clicking and opening certain elements, I now want to type data into certain fields, which UiPath reads from my excel file. This works fine with the “for each row” activity, however, I only want to type into some of the fields only once (until the field “Material”, as you can see from the original post).
I have tried using “row.item(“AuArt”).ToString” for the first type into activity, outside of the “for each row” acitivity, but it does not work for me, because it states that “row” is not declared.
Is there any option, how to read the values from my excel datatable and entering only certain rows/cells, WIHTOUT using the “for each row” activity?
I hope that makes it clearer and thank you already in advance for your help!
I was able to solve this issue by myself, by placing said “type into” activities outside of the “for each row” activity and entering “dtProjekt.Rows(1).Item(“AuArt”).ToString”.
Thank you nevertheless for your replies!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.