Learner007
(Uipath Learner)
December 29, 2021, 4:27am
1
Hi All, I’m working on RE Framework. I have multiple excel files in Input i want loop those excels 1 by 1 from init Transaction to process.
Scenario:
Excel files in – Input
I need to get Excel files path in Init transaction
Loop 1 by 1 excel and read that Excel in Process transaction.
RoboticEnterpriseFramework_Multiple_Excel_Input.zip (1.0 MB)
1 Like
Hey @Learner007
You need to do some modifications to the Get Transaction workflow.
Get all files from directory instead of get transaction item
Pass files(tx.no) to the process transaction
Hope this helps.
Thanks
#nK
Learner007
(Uipath Learner)
December 29, 2021, 4:55am
3
Hi @Nithinkrishna i need to loop files 1 by 1 to process transaction, how to do, i don’t know exactly how to apply that logic.
1 Like
That’s where the second point plays a major role…
Just repeating the explanation…
Inside GetTransaction
Get all the excel files in an array if in_TransactionNumber=1
Next if in_TransactionNumber <= Array.Length
Assign out_TransactionItem = Array(transactionNum-1)
Else out_TransactionItem = Nothing
This will loop through all the files one by one sending it to process transaction for processing where you can have the actual logic.
Thanks
#nK
Learner007
(Uipath Learner)
December 29, 2021, 5:02am
5
@Nithinkrishna i will check this logic once
1 Like
Learner007
(Uipath Learner)
December 29, 2021, 7:54am
6
Hi @Nithinkrishna Check this below code once , i want to update my excel files name and status of that file in new excel can you please check it once.
RoboticEnterpriseFramework_Multiple_Excel_Input.zip (991.0 KB)
1 Like
Learner007
(Uipath Learner)
December 29, 2021, 8:16am
7
Hi All, i updated my code Now i’m able to read files but not able to write status in Excel sheet , In finally section it is working properly, i’m attaching my code below can anyone help me.
Status file Path : Data\Output\Output_Status.xlsx
RoboticEnterpriseFramework_Multiple_Excel_Input.zip (991.0 KB)
1 Like
Sorry what’s d actual requirement you want to write back in excel ?
Learner007
(Uipath Learner)
December 29, 2021, 8:21am
9
@Nithinkrishna My requirement is i will get some files in my devices i want to loop 1 by 1 file and copy that file data and need to paste in another excel , later i want to perform some sap actions with that copied data. once 1 file is processed i want to update status , if any exception occurred in between processing i want to write same error status. i want to go for next file processing
Status file path : Data\Output\Output_status.xlsx
1 Like
Yes it’s clear you can write it in finally block ?
Any issues you are facing with that currently.
Learner007
(Uipath Learner)
December 29, 2021, 8:28am
11
@Nithinkrishna it is going to finally block but not going into success or business exception code it’s not updating status. i attached my code already can u please check that once , may be i did any wrong in that. As per my knowledge i build that code , i don’t have much exposure in RE framework that’s why i’m getting eerrors.
1 Like
Can you paste screenshot of those blocks pls
Is this in finally block ?
Learner007
(Uipath Learner)
December 29, 2021, 8:40am
16
@Nithinkrishna i modified some activities , i disabled few unwanted now it is writing status .
1 Like
So you need to add a condition based on system exception and business exception variables.
If SystemException isNot Nothing
SystemException logic
If BusinessException is Not Nothing
BusinessException logic
If SysEx and Biz is Nothing
Success
Learner007
(Uipath Learner)
December 29, 2021, 8:42am
18
Thanks @Nithinkrishna it worked before, i will cross check my flow once again.
1 Like