Earlier you have shared your partial work flow which is very difficult for me to understand your 100% requirement so i have requested your full work flow so that i can modify and help you to resolve your issue. I understood you are unable to attach your workflow due to joined newly in the forum. thanks for your detailed screenshots below. i Understood your requirement now.
Please add the below steps to your workflow.
Create counter and initialize to 1. Before Data scraping activity place one of condition to check if Counter = 1 then → don’t add any activity keep it empty and else → drag and drop clear data table activity and assign extract data table DT. it will help you to clear data table content in the extract data table DT for second run and further runs.
After Data transpose activity use merge data table activity add source data table will be your extract data table and destination should be merged data table.
Remove the write range activity inside loop and place the same activity in the outside of the loop and assign your merged DT as input data table so that once the loop ends it will write entire data into excel.
After go back activity keep the Assign activity and increment your counter
Counter = Counter+1 to increase counter for all the runs.
i hope you will get some help on the above steps to achieve your requirement. thanks.
I have made some changes in my actual flow and am able to do transpose without custom activity but here the data is overwriting on first 2rows when am running.
(I have invoked this flow inside foreach)
SAMPLE_TEST.xaml (25.4 KB)
when I run first time, 2rows will be written in excel.
when I run second time, only second row should be written from next blank row in excelsheet.
I am confused regarding mergedata here. could you pls check.
I am not sure we both are going on same page. Some of the activities i am not able to view since i am not able to resolve the namespace error for data manipulations. Based on my understanding i have created updated sample work flow. Please check and see if it helps your requirement. Sorry if i am not helping you much. thanks.
Updated.xaml (13.8 KB)
Sorry but you have worked on a commented out sequence. I think you didnt check the complete sequence.
Yeah. In my opinion the commented out work flow is good comparing to your recent workflow. Use custom activity to transpose and aquire some idea from my updated work flow. I am just sharing some help and logic on how to append data efficiently. Thanks.
Some how myself and @Mahimahi meeting dead ends. I have already provided some suggestions. Could you guys have any suggestions on this requirement and throw some helping hands. Thanks.
I will check your updated workflow and get back to you with the results.
Thank you for helping,
Your most welcome. Any time. Please try and let us know. Appreciate your efforts on this requirement.
Can we use two data scrapping activities based on iterations like
if (index =1)
scrape both the columns(data scrapping )
Scrape only column2 (data scrapping)
Hi @Robinnavinraj_S ,
Thanks for your quick response. It is not fixed like how many times we have to use extract datatable since we are clicking some link and getting tables. The issue raised by @Mahimahi . Could you pls redirect your suggestion to @Mahimahi . Thanks again.
As @Robinnavinraj_S suggested, can you please try the above and let us know?
@kirankumar.mahanthi1 put lot of effort of this thread. Great
I just implemented your flow. Am able to write the data using append from 2nd iteration.
But my concern here is I need to delete 1st row from 2nd iteration and only append 2nd row to excel. This is not happening.
Hi @Mahimahi ,
Are you talking about headers(First row). Append range activity have inbuilt capability to ignore the headers. if you want you can delete the first row by using delete rows activity before appending the data. thanks.
Hi @sowmya.krishna ,
You have to provide row number under the position to delete the specific row. No of rows should be one of you want to delete only one row. Thanks.
I have already passed value 1 and its not deleting row.
Could you please tell how to pass value.
Hi @Mahimahi ,
insert/Delete rows activity used to delete the row in the excel itself. do you want to delete the row in data table use remove data row activity in uipath.
I think you stucked with appending the data after each iteration!
Your Actual actual Process Up to transposing
After that Use Path Exists and write a dummy excel file name as below
Yourfull path with the file name C:\users\folder\Filename.xlsx
use if Condition and pass the out of the file exists!
If Exists Then Use Append Range with the datatable
Else use write range!
Maybe they are confused and wrote my name in their post.
I want to delete 1st row in datatable after datascraping (not in excel)and write remaining rows to excel.
I have used remove datarow and then used append range. The data is appending from 1st column. But I need data to be appended from second column. Is this possible.
I have attached a sample of excel. I am getting which have highlighted in yellow but I need data like it’s in blue highlighted color.