LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 97 while running EXE file

I have made an application which reads data over GPIB and publishes the result in EXCEL using NI report.  . I have also included the Excelldynamicvis.vi while builing the application and included ni runtime engine and report while creating the installer.
I installed the application in two differnt PCs. The application(EXE file) runs fine in one PC , while in other PC it does not publish data in EXCEL and generates ERROR 97(null reference passed)
I am using WINDOWS XP and Excel -97
what could be the problem?


0 Kudos
Message 1 of 9
(3,774 Views)

Narain,

First make sure that you have the same version of Excel installed across all machines.  Are you using the report generation VIs?  It might be the case that the VI is looking for a file that is in a different location on a computer which causes this error.  These locations are very important.  I would recommend trying to build an application from an Excel example (go to Help >> Find Examples, then search for Excel and select Excel Macro Example) to see if this is programming or system related.  Hope this helps!

Andy F. 

-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 9
(3,760 Views)
I have Excell 97 installed in the machines. What I have observed,the VI gets stuck at the point where Excel has to be opened . It seems it cannot run Excel Application. I made installers with example code and tried out, but same error is coming. I am not using any excel template or predefined file.
0 Kudos
Message 3 of 9
(3,749 Views)
One option you may look into would be to find the file for the ActiveX call.  For Excel 97 I believe it is called excel8.olb.  Once you have this file located, I would include this file when building your application as a support file and install into a custom directory.  Hope this helps!
 
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 4 of 9
(3,738 Views)
As suggested I included the excel8.olb as a support file. This file gets installed in the subfolder - data. But the same error is coming.  Do i have to do something else?

thanks

Narain
0 Kudos
Message 5 of 9
(3,715 Views)

I would recommend posting a condensed version of your application (strip out everything that doesn't have to do with the error) so that we can take a look at it and see if we can reproduce it. Make sure the stripped application causes the same error and be sure to include both the executable and VI source. Also, are you using the simple error handler? If you attach the error cluster to the simple error handler, you should get some more detailed information -- like exactly where within the Excel VIs the error is occurring.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,704 Views)
I am attaching the EXE and VI file of  the application. I have repalced the Instrument control part over GPIB with random numbers. I have also included the screen shot of the error. As shown the Table(in Labview)  gets updated but the excel repot is not generated

Thanks & Regards,

Aditya Narain

0 Kudos
Message 7 of 9
(3,696 Views)

The VI and executable ran okay on my machine and I don't see any programming errors, so my best guess is that there is something wrong with Excel's ActiveX registration on that particular machine. I've inlcuded a link to an online knowledgebase here that outlines how to check Excel's ActiveC registration. Check it out and make sure that everything is registered properly.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(3,683 Views)
The Problem got  solved after installing Office-97 SR-1 Patch Utility.

Thanks a lot for your help


Regards,

Aditya Narain

0 Kudos
Message 9 of 9
(3,673 Views)