LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 97 when opening existing Excel workbook

I have a LabVIEW application that reads environmental data from two transmitters and writes the data to two sheets of an Excel workbook (this is done using ActiveX).  I have run the application successfully on my computer and a laptop, both of which are running Windows XP and Office 2003.  After installing the application on the computer that we want to use for the actual test, however, a problem was observed.  If we attempt to open an existing Excel file (which is what we need to do), LabVIEW generates an error 97 message (null reference) and the program does not run.  This computer is running Excel 2000.  I checked the registry settings for Excel per a similar discussion and found no problems.  Opening a new Excel file works fine.  Thanks.
0 Kudos
Message 1 of 4
(4,460 Views)
Hello,

A few things come to mind:

1. I wonder if the excel version matters here.  Could it be that you have a different version of the activeX control on your target machine?

2. Posting a minimal, simplified version of your code may help as well... so we can see precisely where the error occurs.  Maybe just the open operation and if relevant the ActiveX property node from which you are receiving the error - identifying precisely where the error originates will be helpful.

3. Here is another thread addressing the same error that may be helpful to you:

http://forums.ni.com/ni/board/message?board.id=170&message.id=172065

Give it a thorough read just to make sure you're not having a similar issue - if you are, you just may have the solution!

I hope this helps!

JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 4
(4,456 Views)

I have gotten the error 97 before a couple of times, One was due to the different versions of Excel and the other was due to the file already being open by another program.

For more information and some sample VI's and tool kits, you can go to the excel board




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 3 of 4
(4,449 Views)
Excel 2000 and Excel 2003 ActiveX aren't compatible.

I had a program that opened an Excel file and wrote some values to a worksheet in it using ActiveX.

Just the opening of the file caused errors.
0 Kudos
Message 4 of 4
(4,430 Views)