From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activex error Error -2147417851 "server threw an exception"

Hi Yiannis,

The code ran fine for me with LabVIEW 7.1 and Microsoft Excel 2007.  The only change I made was to the base path, saving the file to a different location on my computer. 

Which invoke nodes cause errors?  Have you tried different or additional inputs where there is a notice about an unwired or bad terminal? 

Jennifer R.
National Instruments
Applications Engineer
Message 11 of 14
(1,437 Views)

Hello Jennifer thanks for the reply. I am working on it for two days now, but no luck...

May be i should upgrade excel???

I don't know, I'll let u know my progress..

Thanks again

0 Kudos
Message 12 of 14
(1,421 Views)

Well I have to admit that sometimes you need a bit of luck..

I deleted and created new invoke nodes exactly the same as Mike had done in his code. I wired them as in Mike's vi and the vi runs fine! No error...

I want to thank anyone who helped Especially Mike and Jennifer. If possible and if any of you guys have time I would like to know what did i do wrong in my first vi. It is good to know what was the problem...

Anyway guys thanks again looks like the problem is solved...

 

cheers

Yiannis

0 Kudos
Message 13 of 14
(1,418 Views)
Hi Yiannis,
 
It's hard to say if there was a particular change that eliminated the error, or if it was a combination of factors.  The main differences I noticed are the placement of the Close Reference functions, the use of To Variant, how the filename is specified, and setting SaveChanges to False when closing the workbook. 
 
I'm glad to hear that everything is working now!
Jennifer R.
National Instruments
Applications Engineer
Message 14 of 14
(1,392 Views)