Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error -2147417851 when writing report to Excel

113 views
Skip to first unread message

paol

unread,
Sep 26, 2003, 8:31:47 AM9/26/03
to
I have taken the Active-X example code where a table is written to
Excel and a macro is run and adjusted it to fit my purposes. In my
case, an array is written to an Excel file and thereafter a macro is
run which creates some graphs and a report. This works fine on my
computer with Windows 95. But, when running it on the computer it is
supposed to be used on, Excel gives an access error 0xc0000005 just
before a copy operation resulting in the "error -2147417851 ocurred at
the server through an exception at my.vi". I am using LabVIEW full
development 6.1, Windows NT 4 with the latest SP and Office 97 SP2
both wit and without all upgrades. However, if I change my macro so
that it doesn't do the copy operation, it works just fine, and the
error is delayed until I close the document. Since my LabVIEW vi ends
when the macro is completed, I don't get any error in LabVIEW.

I have searched Microsoft technet and tried the suggestions I found
there, read all similar problems I could find here (I found four) but
nothing seems to help. I have also tried it on a machine with XP and
Office 97 SP2. The macro works fine there without modification and
LabVIEW ends without error and I can even close my Excel document
without errors, but when I try to quit Excel I get the same error
message as always, only a different address.

I have tried to terminate the refnums in different order, inserted a
delay and so on, but nothing seems to help. I still believe the error
is related to LabVIEW, since my macro runs without error when launched
from Excel, but I encounter the same error if the macro is launched
from Excel with LabVIEW open in the background, even without open
vi:s.

I have run out of ideas, and even if I am able to create the reports,
it doesn't feel good when Excel crashes every time. Any help would be
much appreciated.

Thanks

Nick Storton

unread,
Sep 26, 2003, 8:54:43 AM9/26/03
to

paol

unread,
Sep 29, 2003, 3:43:15 AM9/29/03
to
Thanks, but I have already tried that and it did no difference. Excel
crashes even if I don't call the macro fom LabVIEW but runs it from
Excel, as long as LabVIEW is running, even if its not doing anything.
0 new messages