Search code examples
blueprismrpa

How can I store the data of an open excel workbook in a collection using BluePrism?


I open an Excel workbook with a click on a button in another program which works pretty fine. Now I would like to store the data of the workbook in a collection without saving the excel file. The name of the workbook changes dynamically. How can I save the data of the workbook in a collection?

I've already tried to use an Action stage with the Excel VBO Business Object and 'Get Worksheet as Collection' Action but as I don't know what to enter as a Workbook name nothing happens.


Solution

  • To do what you want is like this:
    enter image description here

    The MS Excel VBO action "Attach" will attach to whatever instance of Excel you happen to be running, regardless of any workbook names. It will output the "handle" data item that you can then use with the "Get Worksheet as Collection" action.
    So this way you don't need to save the file. However, be aware that this will not work if you have more than one instance of Excel running.