I am trying to automate excel operations. Intermittently I get an error when I try to open an excel file. It failed to open the file when the error is encountered. I get an error in the background "0x800706F7; The stub received bad data.". Stacktrace is mentioned below.
I am using JNI wrapper to automate the process. I have
below system settings where I am testing this behavior. Every 15-20 runs
I get this error once. Any lead on this issue will be very helpful.
System Configuration:
OS: Windows 10 Enterprise 64 bit 8 GB RAM
Office: MS Office Professional 2016
Stack Trace:
Caused by: com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x800706F7; The stub received bad data.
at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:172) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at com.jniwrapper.win32.com.ComFunctions.coCreateInstance(SourceFile:165) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:81) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at
com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>(SourceFile:53)
~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at
com.jniwrapper.win32.excel.impl._ApplicationImpl.<init>(Unknown
Source) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at com.jniwrapper.win32.excel.Application.create(Unknown Source) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at com.jniwrapper.win32.jexcel.ft.run(Unknown Source) ~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at
com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:620)
~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]
at
com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:562)
~[bot-command-msexcel-5.1.1-20201126-171913.jar:?]