Combine Multiple Collections

Hi ,
According to requirements i have to update a form .
In process i will get 5 collections and i need to combine all of them(As i need data from all of them) in to one collection to update the form .
For Combine collection VBO i can only combine 2 , Is there any other way to combine all , and i have repetetive fields for 3 collections which i cannot combine all.
Suggest me on this

Thanks
Leela
 

VJR

Well-Known Member
Is there any other way to combine all
Yes.
- Write each collection one by one to Excel on one single sheet in columns next to each other.
For eg; if first collection writes 4 columns from A to D then write the 2nd collection starting from E and so on for the other collections.
- Use Set cell value to rename the column headers which you think are repetitive.
- At the end of all 5 collections, now you have the sheet ready.
- Get the Worksheet into collection which will finally come into one single collection.
 

MadhuG001

Member
Yes.
- Write each collection one by one to Excel on one single sheet in columns next to each other.
For eg; if first collection writes 4 columns from A to D then write the 2nd collection starting from E and so on for the other collections.
- Use Set cell value to rename the column headers which you think are repetitive.
- At the end of all 5 collections, now you have the sheet ready.
- Get the Worksheet into collection which will finally come into one single collection.

Hello VJR,

I didn't get the above explanation.
Could you explain a bit more?

Suppose I have data in 3 excel sheet (All are having same columns) in one folder.
How can I move all of them to one Collection in Blue Prism?
Please explain elaborately.

Thank You.
 

waziaks

Member
Hi MadhuG001,

Please follow the below steps to complete your task. I've done this for one of my projects. I've attached necessary screenshots which help you to complete your task.


1. You need to use "Get Files" action under "File utility management" vbo to get your all files from one folder to collection (lets say collection name is Collection1) .
2. Create a instance for excel using Excel VBO and with all the necessary fields like workbook name etc.
3. You need to run loop on a ("Collection1") collection which you've created by using "Get Files".
4. To get exact path of all the files one by one inside the loop drag one calculation field and mentioned [Collection1.Path] means collection name and path of the files which keeps changing as your loop going forward.
5. Inside the loop create another collection (lets say collection2) to get all the data from excel sheet to collection2 by using "Get worksheet as collection" under "MS Excel VBO".
7. Create another collection"lets say Collection3"
6. You need to use "Append rows to collection" action under "Utility - Collection Manipulation" which has two inputs "Main Collection" and "Append rows to collection". In Main Collection you need to mention "Collection3" and in Append rows to collection please mention "Collection2" (the collection you've created from "Get worksheet as collection" under "MS Excel VBO".
7. Then in output parameter again you need to mention "Collection3".
8. As your loop goes you'd notice that all the data first comes in Collection2 then data will get appended into Collection3.
9 Once the loop finished you need to paste the data from collection3 by using Write Collection under MS Excel VBO
10 Save the workbook

Please let me know if you need anymore help in this.

Thanks
Wazi
 

Attachments

  • 1.PNG
    25 KB · Views: 78
  • 4.PNG
    29.8 KB · Views: 67
  • 5.PNG
    26.4 KB · Views: 59
  • 6.PNG
    24.8 KB · Views: 56
Top