I'm new to Blue Prism and I'm writing a callable, shared Blue Prism process to start an Excel instance, open or create a workbook/worksheet, and allow the calling process to interact with that workbook. This will allow me to validate the directory and file names and perform all the actions and error checking without having to rewrite the same code in each of the many robots we're writing. I'm passing the Excel handle back to the caller but, when the caller attempts to interact with the spreadsheet, a "The given key was not present in the dictionary” error occurs. I speculate that, when process 1 starts an Excel instance and opens or creates a workbook, process 2 must “connect” to that Excel instance and workbook in order to interact with it. If I am correct, process 2 did not start any Excel instances so its dictionary is empty and the Excel handle being passed to it cannot be resolved.
Pages in the Excel VBO include Open Instance, Set Current Instance, Attach, and Attach to Workbook. Some of these look like they might address this problem but there is no documentation other than the brief comments in the Page Information stages. In the case I described above, there is only one Excel instance but other situations will have multiple Excel instances open. I don't want to close and reopen the workbook because that defeats the purpose of creating a callable, reusable process to handle this task. Is there a best method for sharing a specific Excel instance (with or without reference to an open workbook) between two different Blue Prism processes?
Pages in the Excel VBO include Open Instance, Set Current Instance, Attach, and Attach to Workbook. Some of these look like they might address this problem but there is no documentation other than the brief comments in the Page Information stages. In the case I described above, there is only one Excel instance but other situations will have multiple Excel instances open. I don't want to close and reopen the workbook because that defeats the purpose of creating a callable, reusable process to handle this task. Is there a best method for sharing a specific Excel instance (with or without reference to an open workbook) between two different Blue Prism processes?