Search code examples
blueprism

MS Excel VBO Open Workbook Action fails


I am attempting to open an instance of excel from a file path I have stored in a collection. Currently I am using the "read Collection Field" Action to grab my file path from my collection. The action stores the file path in a data item. Then I am using the "Open Workbook action through the Excel VBO and referencing the data item to give the correct file path I wish to use. However, when I get to that action, I receive this message "Internal : Could not run the object because one of the code stages has a compile error, use Check for Errors for a list of problems". The problem is that there are no errors when I check the errors section.


Solution

  • If you are so far successfully capturing the file path into a data item, in order to use it first use Excel VBO "Create Instance" and ensure you create a handle. Then use Excel VBO "Open Workbook" using the same handle, and the data item (the file path). This should open the workbook. Finally, if you want to display the workbook, use Excel VBO "Show" (using the same handle). The reason is failing at the moment is perhaps because there is no pointer to the active instance, i.e. the handle.