Question

Excel Advanced: Open Action Failing

  • 14 February 2021
  • 5 replies
  • 317 views

I am using the Community Edition (A2019) and going through the training (Getting Started with Robotic Process Automation (RPA)). When it gets to the point were I need to open an Open a file in Excel, the execution times out and Excel never opens.

 

I am using Windows 10, Microsoft Office 365(2016) (32 bit) my JRE is using the 32bit JRE but Excel never launches.

 

I checked the log files for the run and come up with the following stack trace:

 

2021-Feb-14 Sun 15:34:27.408 ERROR - com.jniwrapper.win32.jexcel.Application {deploymentId=ca3da7e4-a026-4169-9acc-e9554296a34f_3fff162bff269ae1, traceId=3fff162bff269ae1} - error(SourceFile:69) - java.lang.reflect.InvocationTargetException: null

at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.rethrowExceptionIfSaved(MessageLoopThread.java:644) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread.doInvokeAndWait(MessageLoopThread.java:273) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.jexcel.Application.<init>(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.adapter.factory.MSExcelExecutor.getApplicationInstance(MSExcelExecutor.java:91) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.adapter.factory.MSExcelExecutor.getExecutor(MSExcelExecutor.java:58) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcel.getExecutor(OpenExcel.java:119) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcel.execute(OpenExcel.java:100) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcelCommand.execute(OpenExcelCommand.java:168) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botrunner.bot.Bot_Content.executeNode5(Bot_Content.java:211) ~[?:?]

at com.automationanywhere.botrunner.bot.Bot_Content.play(Bot_Content.java:229) ~[?:?]

at com.automationanywhere.botrunner.Main.play(Main.java:63) ~[?:?]

at com.automationanywhere.botengine.service.impl.BotLauncherImpl.runBot(BotLauncherImpl.java:22) ~[bot-launcher.jar:?]

at com.automationanywhere.botengine.service.impl.DispatcherImpl.lambda$start$7(DispatcherImpl.java:345) ~[bot-launcher.jar:?]

at com.automationanywhere.botengine.utils.ThreadUtil.lambda$withThreadContext$0(ThreadUtil.java:20) ~[bot-launcher.jar:?]

at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]

at java.lang.Thread.run(Unknown Source) [?:?]

Caused by: com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80029C4A; Error loading type library/DLL.

at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:172) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.com.ComFunctions.coCreateInstance(SourceFile:165) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:81) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>(SourceFile:53) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.excel.impl._ApplicationImpl.<init>(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.excel.Application.create(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.jexcel.ft.run(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:620) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:562) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

 

2021-Feb-14 Sun 15:34:27.413 ERROR - com.automationanywhere.botcommand.excel.msexcel.adapter.factory.MSExcelExecutor {deploymentId=ca3da7e4-a026-4169-9acc-e9554296a34f_3fff162bff269ae1, traceId=3fff162bff269ae1} - getApplicationInstance(MSExcelExecutor.java:96) - Exception occurred while creating Application object, retry count : 0, message: Cannot run the Microsoft Excel application.

2021-Feb-14 Sun 15:34:28.642 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:66) - Starting cleaner ...

2021-Feb-14 Sun 15:34:28.643 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:91) - Exiting cleaner ...

2021-Feb-14 Sun 15:34:30.642 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:66) - Starting cleaner ...

2021-Feb-14 Sun 15:34:30.644 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:91) - Exiting cleaner ...

2021-Feb-14 Sun 15:34:32.642 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:66) - Starting cleaner ...

2021-Feb-14 Sun 15:34:32.642 INFO - com.automationanywhere.botengine.service.impl.CleanerImpl {} - run(CleanerImpl.java:91) - Exiting cleaner ...

2021-Feb-14 Sun 15:34:33.770 ERROR - com.jniwrapper.win32.jexcel.Application {deploymentId=ca3da7e4-a026-4169-9acc-e9554296a34f_3fff162bff269ae1, traceId=3fff162bff269ae1} - error(SourceFile:69) - java.lang.reflect.InvocationTargetException: null

at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.rethrowExceptionIfSaved(MessageLoopThread.java:644) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread.doInvokeAndWait(MessageLoopThread.java:273) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.jexcel.Application.<init>(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.adapter.factory.MSExcelExecutor.getApplicationInstance(MSExcelExecutor.java:91) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.adapter.factory.MSExcelExecutor.getExecutor(MSExcelExecutor.java:58) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcel.getExecutor(OpenExcel.java:119) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcel.execute(OpenExcel.java:100) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botcommand.excel.msexcel.commands.OpenExcelCommand.execute(OpenExcelCommand.java:168) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.automationanywhere.botrunner.bot.Bot_Content.executeNode5(Bot_Content.java:211) ~[?:?]

at com.automationanywhere.botrunner.bot.Bot_Content.play(Bot_Content.java:229) ~[?:?]

at com.automationanywhere.botrunner.Main.play(Main.java:63) ~[?:?]

at com.automationanywhere.botengine.service.impl.BotLauncherImpl.runBot(BotLauncherImpl.java:22) ~[bot-launcher.jar:?]

at com.automationanywhere.botengine.service.impl.DispatcherImpl.lambda$start$7(DispatcherImpl.java:345) ~[bot-launcher.jar:?]

at com.automationanywhere.botengine.utils.ThreadUtil.lambda$withThreadContext$0(ThreadUtil.java:20) ~[bot-launcher.jar:?]

at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]

at java.lang.Thread.run(Unknown Source) [?:?]

Caused by: com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80029C4A; Error loading type library/DLL.

at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:172) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.com.ComFunctions.coCreateInstance(SourceFile:165) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:81) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>(SourceFile:53) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.excel.impl._ApplicationImpl.<init>(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.excel.Application.create(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.jexcel.ft.run(Unknown Source) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:620) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:562) ~[bot-command-msexcel-5.4.0-20210117-080101.jar:?]

 

 

NOTE: I have reinstalled office, and the JRE. I also tried some suggestions off StackExchange without success.

 

Are there specific version of Office supported?

 

Thanks.


5 replies

Thanks for the reply.

 

I was using Excel Advanced, Office is installed on my computer as a desktop application.

 

Any other thoughts on what is causing this?

@Michael Boscon​ 

There are 3 types of excel cmd

  1. excel basic (microsoft office not installed)
  2. excel advance (microsoft office installed)
  3. office 365

So use the commands accordingly .

@Michael Boscon​ 

Can you share the ss of Code we can look into it.

I also had the same problem. Just reinstall MS Office and then it will work just fine

Badge

In some scenario uninstall MS office left with some residual files as well as registry. So completed cleanup and then install Fresh MS Office can resolve this issue.

Complete clean up shall be done by office scrub VBS provided by Microsoft.

https://support.microsoft.com/en-au/office/uninstall-office-from-a-pc-9dd49b83-264a-477a-8fcc-2fdf5dbf61d8

Reply