LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error code "-2146827284" when trying to open an Excel workbook using ActiveX

Solved!
Go to solution

Hi all,

 

i have a problem using ActiveX to open excel files. I get error code "-2146827284" (unknown error) when trying to open a workbook. This problem occurs on only one machine i work with, on the others it works fine. All machines have the same setup, Excel97 and Excel2007 installed on them.

 

Any ideas??

 

 

Thanks

Download All
0 Kudos
Message 1 of 11
(7,701 Views)

 

0 Kudos
Message 2 of 11
(7,685 Views)

A lot of times when automation Excel through ActiveX an error in the code results in Excel remaining still running in the background.

This will cause problems with subsequent actions.

 

 

0 Kudos
Message 3 of 11
(7,672 Views)
The problem even occurs after a reboot of the system and does not occur on other machines. A code error should cause an error on other machines too, shouldn't it?
0 Kudos
Message 4 of 11
(7,665 Views)
For sure the file is there, the _application object gets created without an error.
0 Kudos
Message 6 of 11
(7,656 Views)

It looks like the Excel file is located on a server mapped to K:\

What happens when you move it to the local hard drive C:\?

0 Kudos
Message 7 of 11
(7,653 Views)

@andyforpresident wrote:
For sure the file is there, the _application object gets created without an error.

Creation of the application object has nothing to do with opening the workbook, which is what is generating the error. If you are getting an error with opening the workbook then you either have the wrong path, a permissions issue, a network issue, or the file is already open.

0 Kudos
Message 8 of 11
(7,649 Views)
Ok, I try to move it to a local hard drive, K is a network drive, that's right. I have to wait till Monday to give it a try because I reside in Germany and I'm out of office since seven hours ;-).
And thanks for the little object creation course, I'm not very familiar with activeX.
I will tell you on monday. Thanks a lot!
0 Kudos
Message 9 of 11
(7,642 Views)
What makes me wonder is the fact that it works on other machines.... same permissions etc.
0 Kudos
Message 10 of 11
(7,640 Views)