I have just started work with UIPath and have some issues. I can’t understand easy task and I hope you help me. For example, have Excel file with 1 Column “Name”. I want Extract info in web and write data in second Column “Description”. So, will write my steps…
Read Excel file;
Took For Each Row and puted Assign (Name = row(“Name”).ToString);
Took Open Browser and put Type Into (Name + “[k(enter)]”). And puted Get Text. After that Close Application.
So in this finnaly step I puted Application Scope and added Write Range. In Write Range I wrote variable the same with variable Get Text. But I have error.
Help me, please, and tell me what I must to do.
Thank you in advance.
Hi
welcome to UiPath community
the steps you have used is fine
but one step to be added
so
–once after reading the excel with read range use add data column activity with column name as “Description” and in the dattable mention the variable name form read range
–then use a for each row loop and inside the loop once aafter working with web page use a assign activity like this row(“Description”) = “your value”
now after for each row lop use a write range activty and enter that into excel file
Only don’t understand where I have error, could you will look. Because only copied data the first column, not info what I took in web.Main.xaml (16.0 KB)
Fine
i saw your xaml
in that along FOR EACH ROW the assign activity should be like this row(“Description”).ToString = your-get text-outputvariable.ToString
and place the excel application scope outside the for each row loop that keep that as a next activity to for each row loop in the flow chart
because as you have kept the excel file inside the for each row loop it will write the datable for each iteration inside the loop
@Palaniyappan@bcorrea Thank you for your attention, but I really don’t understand. Now I did all that you said and now have error and I don’t understand what I must to do. Could you please look xamlMain.xaml (18.5 KB)
Make sure your excel is not empty and that your header’s name is the same as the info you’re reading. Also you can use “Get Row Item” which is made just for DataTables.
Also your read range will always write in b1 because you have it in the for each loop. You can use “Add Data Row” to add a row to a new datatable or to your current datatable. This must be inside the for each because we want to add each result. in the array row you will put a arrayrow this is spelled between {} like this {animal, description} so you separate by comma.
Also make sure that the “Add data column” type is the type of column you want to add. I think you want to add a string type not a object type.
Hi, @rmunro
You are shure I want to add a string type. I want add data my current datatable. Let me explain, I started to study Uipath and wanted to understand the principle of work using a simple example. For example, I have the names of animals in one column “Animals” and I take information on Wikipedia and want to write it in the other column “Description” opposite each animal, that’s all. So, I did what you said but now I have other error. Main.xaml (19.0 KB)
Thank you very much @md.ahtesham , yes it is good sample. But don’t understand why my process not run and have an errors. I have also one question, maybe you can help me… Sometimes, when I want run one xaml another xaml opens immediately and starts. Why is this happening?
i didn’t get your question correctly…
But if you mean to say that 2nd xaml file run immediately , this is obvious . your other .xaml file will run after whenever it will find invoke workflow File activity.
If you want to allow your 2nd .xaml to have delay you can just add dealy activity . ( but manual delay is not good practice.)