Hello guys i have a process having 3 excel as input in one folder.
I want to process 2nd excel after completing first excel and also i want to process 3rd excel after completing 2nd excel.
is that possible at first run
Hello guys i have a process having 3 excel as input in one folder.
I want to process 2nd excel after completing first excel and also i want to process 3rd excel after completing 2nd excel.
is that possible at first run
Use for each file activity to iterate through each excel file.
hello @Gokul_Murali
It is possible take for each file in folder and provide that file path to the excel path as input and after processing close excel instance or close excel scope.
Hope this helps.
I used RE FRAMEWORK for this so can you elaborate.
yes its possible, use for each file in folder activity and filter the files by using "*.xlsx"
and within the for each file in folder use the excel activities so that all the excels in that particular folder will be processed. Use this file in first run and all the excels will process at one after the other only for once.
Regards
You can perform directory.getfiles activity or for eqch file in folder and order them with how you decide which is first second and 3rd
Cheers
If you want to pass the excel data to queue,
This will read the each file one by one and pass the data to queue.
or if you want to use excel instead of queue then read each file one by one using for each and append the data to the one datatable.
Use directory.getfiles(folderpath,“.xlsx”)
Use for each
Check with the if condition
Hope it helps!!
Create a list variable and store the file in the folder.
Directory.Getfiles(“Folder Path”)
Iterate the list variable to take the each file in folder.
Inside the for each use your excel activities then in file path pass the currentitem in for each loop.
Then it will take one file in first iteration, in second it will take second file, in third it will take third file.
Hope it helps!!
Assign
ArrFiles=Directory.GetFiles(“FolderPath”,“*.xlsx”)
Take For Each loop
Hii,
for this first you have to store the file path in an array or in datatable (Should be done under the config is nothing condition in init state) row then use the reframework by taking that datatable input or array as input by providing transection number as the index.
Hope this will solve your doubt.
@supriya117
@Shubham_Kinge
@vrdabberu
Guys i have used For Each File In Folder activity.
How would i pass it to read it to read range activity.
Use the read range within the for each do sequence and pass the CurrentFile in the path option
Regards
Place read range in for each loop.
Hello there,
First decide how you want to do as in re framework if you want to process first excel then go to get next transection item and again take another excel to process if you want to do like this then Do save all excel files path in a string array, and provide that array as input and loop it using the index. if you dont know how to do it with array you can try video @RAKESH_KUMAR_BEHERA’s UiPath Tutorial | Uipath Array Example - YouTube.
If you want to read all data in one go then you have to provide separate datatable output name to each activity and if you want to merge all data then use for each file in folder and then provide logic like if data already present in datatable then merge with previous dt.
iam using some write cell so do i need to pass the current file var in all write cell
Can you be more specific.
Yes, if you’re using the workbook activity to perform the write cell activity.
Thanks
@adiijaiin
@supriya117
@vrdabberu
@Shubham_Kinge
Guys i have used the activity like this.
RPA is Taking 2 excel file in for each file in folder (Used Message box to check)
The thing is that it is processing the 2 excel and after processing it got stopped and not processing the first excel.
I think so your activities such as Get Sheets Name, assign and write cell should go inside the loop as well.
You want to write the Remarks Column in all the three files right?
The reason it’s only processing the 2nd excel is, because the loop updated the ExcelPath twice, meanwhile your other activities weren’t places inside the Loop.
Happy Automation!