How can I use ReFramework with two sheets?

Hello everyone !
I am using ReFramework in my automation. Firstly, it takes “Sheet1” as reference to process which is perfectly fine, when all transaction is done, process is completed. But I have a scenario where I have to use excel “Sheet1” and Then “Sheet2” to process.

Eveything is Ok when it comes to work with only one sheet. What if ? I have to process “Sheet2” also after completing “Sheet1” process - using ReFramework.

Hi @prabin_chand1
If you’re processing excel records in RE Framework, I assume that you’re reading them all in “Init” state and then using Get Transaction Data workflow to read rows one by one.

At the time when you read Sheet1 into, say DataTableSheet1, you can immediately also read Sheet2 into DataTableSheet2 and then merge the two datatables.
You may merge one table into another and then only process items off of the master datatable which has records from both Sheet1 and Sheet2.

I hope that helps.

[ EDITED ] :

Column name are same, rows may differ. But have to process in same website.

Are the process steps different for Sheet2 items?

If yes, and it’s still not viable to have two separate projects (i.e. if it’s a requirement to process them as part of the same process) then you can modify the logic in Process.xaml to act a certain way for Sheet1 items and another for Sheet2 items.
When a transaction item (of type System.Data.DataRow) is received, you can check for specific column names to determine which type has been received and split the logic.

1 Like

[ EDITED ] :
Column name are same, rows may differ. But have to process in same website.

And also the process for sheet 2 are shame.
The values in sheet2 are sensitive and only have to process after completing “Sheet1”

If the column names are same but the process is the same, then it should be straight-forward, the combined datatable will be processed as if being read from the same sheet.

Here is an example of how to use Merge Data Tables by @Yoichi

1 Like

Hi @prabin_chand1 ,

You would need to modify RE framework a bit. In the initialization state, in First Run, get the sheet names of the excel file. Now, use the sheet name as transaction item. In the process part, read the sheet, do what what you need to do…and after processing one sheet, you’ll move to the other sheet.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.