LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activex error Error -2147417851 "server threw an exception"

Hello everyone..
I am stuck in an activex - excel issue and i need help. I have already tried most of the tips provided in the forum but still no luck.
The problem is this: I have the attached vi, slightly modified, and it creates an excel, renames the sheet, on the next iteration it opens the previously created xls and adds another sheet and renames it. I get this error "Error -2147417851 occurred at The server threw an exception." but not always. Sometimes when i delete the file created to run the vi again, it works fine, on my second attempt i get the error again. Weird thing is that when i use the "highlight execution" debugger the problem disappears. I upgraded excel 2000 with SP3, i tried to insert a delay using Flat Sequence Structure but no luck. I tried the MS office homepage but nothing. If anyone can think of something to help please, please let me know.

Labview 7.1, MS Excel 2000 SP3.

Thanx in advance for your time guys..
Yiannis


0 Kudos
Message 1 of 14
(10,263 Views)
tough one eh??
0 Kudos
Message 2 of 14
(10,249 Views)
 
 
 
The error comes from LabVIEW using many threads for the activeX objects; and setting it to run in the user-interface thread means that it will only use one thread to manage its activeX objects.
Have you looked at this thread?
 
Especially Carla's reply:
 
Someone found a solution by updating office with service releases SR-1 and SR-2. The error had stopped after SR-1.
 
RayR
0 Kudos
Message 3 of 14
(10,237 Views)
Hello thanx for your answer, but I've tried that already. I upgraded Excel 2000 with sp2 & SP3 and I've gone through the MS web page but no luck.
 
Thanks for trying anyway...
0 Kudos
Message 4 of 14
(10,234 Views)
Hi I_Pant,
i made some changes and don´t get your error. Why do you open and close excel between both steps?
See the attached example.
 
Hope it helps.
Mike
Message 5 of 14
(10,229 Views)
Mike thanks for the answer, but i have LV7.1 and I can't run it...
0 Kudos
Message 6 of 14
(10,221 Views)

Hi Yiannis,

Here is the code Mike posted, saved for LabVIEW 7.1. 

Jennifer R.
National Instruments
Applications Engineer
Message 7 of 14
(10,193 Views)

Jennifer hi and thanks for your help.

A quick question : Did you open the vi at all when you saved it for LV7.1? It gives me two errors when I think it shouldn't..I was wandering if it has anything to do with the differences between Version 8 and 7.1...

Thank you very much for your time...

Yiannis

0 Kudos
Message 8 of 14
(10,185 Views)

Hi I_Pant,

which errors do you get?

Mike

0 Kudos
Message 9 of 14
(10,183 Views)

Hello Mike

 It gives two errors one in the "false" case at the Invoke node of Workbook (unwired or bad terminal), and one at the "true" case at the invoke node of workbooks (unwired or bad terminal). It seems to me that it has something to do with the filename you are passing. I am trying to work it out now, the problem is that it looks right to me!.

Anyway Mike I really appreciate your effort, thanx again...

0 Kudos
Message 10 of 14
(10,181 Views)