Closed
Pega Robotics .RunMacro - Microsoft Excel COM instance is not available
Hi all,
I get the following error when trying to run an excel macro through pega robotics. Any ideas how to stop it happening?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
Hi all,
I get the following error when trying to run an excel macro through pega robotics. Any ideas how to stop it happening?
You may not be waiting long enough for the document to open before attempting to run the macro. Try running it from a separate button after you have called the Open method on the workbook. In addition, make sure that macros are enabled.
Hello,
We have been seeing this error at one of the projects in our account. Currently, it uses RAS 8.0.1088.0.
We have tried the suggestion by Thomas, which solved the error partially. In some particular scenario, we still end up receiving the error even after having a 2 second pause in place.
Scenario Details are as follows:
The project uses macros extensively present in various Excel files. The macros, upon execution, generate variety of pop-ups, and usually we need to PerformClick on them. To achieve this, the DEV team has followed following approach:
Well, not really a right way to do things, but this is what the DEV team has done across the whole project. And unless we find out the exact cause, its difficult to convice them to give up on the above implementation.
We happen to be getting the 'Microsoft COM instance is not available' error, when the macro execution is done inside the loop. We have tried a workaround as follows and it works all the time:
Hello,
We have been seeing this error at one of the projects in our account. Currently, it uses RAS 8.0.1088.0.
We have tried the suggestion by Thomas, which solved the error partially. In some particular scenario, we still end up receiving the error even after having a 2 second pause in place.
Scenario Details are as follows:
The project uses macros extensively present in various Excel files. The macros, upon execution, generate variety of pop-ups, and usually we need to PerformClick on them. To achieve this, the DEV team has followed following approach:
Well, not really a right way to do things, but this is what the DEV team has done across the whole project. And unless we find out the exact cause, its difficult to convice them to give up on the above implementation.
We happen to be getting the 'Microsoft COM instance is not available' error, when the macro execution is done inside the loop. We have tried a workaround as follows and it works all the time:
Basically we have stopped using the ExcelConnector. This is also because, we also have been receiving a NullReferenceException while using GetCellValue(), SetCellValue(), ImportData(), ExportData() methods using ExcelConnector in the scenario mentioned above. Even for those methods, we came up with C# script based workarounds.
We may be wrong, but we think that the 'COM Instance' mentioned in the error is Excel Application Instance that Connector tries to get when the automation thread hits RunMacro or any other methods mentioned above. Due to some reason, it fails to get it. This may have been caused by the repeatative execution inside the loop, or the rThread running (matching process), hence the problem. We also think that having a Windows Adapter in 'MonitorAll' might have something to do with it, but its just a speculation. We badly need to know the root cause.
We can not attach the log file that contains the above exception, because it contains proprietary info. Will try to provide if we are able to regenerate with a sample solution.
Question Solved
Question
Question
Question Solved
Question Solved
Question Solved
Question
Question Solved
Question Solved
Question Solved
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.