LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 97 in save report to file excel activex

Hi,

   So I am using both excel activex and the report generation toolbox for excel to format a document. Everytime I try to save the document I get error 97. I can seem to find why and how to fix it. The error means it's a null reference which following my code isn't true. Even when I use the save as activex method I still get the same error. 

 

Please take a look and see if you can help me figure this out.

 

Thanks

0 Kudos
Message 1 of 6
(3,795 Views)

Hi!

There is a known issue about that : http://digital.ni.com/public.nsf/allkb/37591EDE7A15F5DC86256CC3005BFE35

I ran into this issue with some recent versions of MS Office : it seems that the ActiveX protype of some functions changed. So you have to dig down into the Report Generation Toolkit Excel function to find whcih VI is producing the error and refresh the function protoype... Smiley Sad

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 2 of 6
(3,748 Views)

Can you explain what you are trying to do?  Perhaps provide a (small) example of the data you want to put into Excel, and a (similarly small) Excel Workbook that you hope to make.  It looks like you are interested (perhaps more) in the detailed formatting of the Worksheet rather than getting the data into Excel.

 

Can you provide a little more information on your configuration?  What version of Office are you using (Microsoft makes changes and doesn't always tell NI)?  There have been reports of problems closing/saving with Excel 2016 -- I've not experienced any problems with Excel 2013 and earlier versions.

 

Bob Schor

0 Kudos
Message 3 of 6
(3,733 Views)

Hey Bob,

   My goal is to color the  headers of both files and format all the cells size and border and font.. Then I want to look  in data1.csv and check if values in column J is 50% of column I. If it is then color the whole row red. If the value is between 10-50% the color it yellow. then save the files with the latest formats. Hope that helps.. files are attached. I am using Microsoft 2010 with labview 2014

Download All
0 Kudos
Message 4 of 6
(3,726 Views)

There seems to be a timing issue between the 2 save report vi where the workbook reference get lost. I did a simple modification to test this and I didn't get the error by running the vi continuously. This is only a quick patch so there should be a better way to implement this.

 

Ben64

0 Kudos
Message 5 of 6
(3,713 Views)

Thanks Ben.. I'll look at it.

   I did manage to get it to work by starting over and using only vis from the report generator. I also cleaned it up and fix some mistakes I made...I'll post my version later.

0 Kudos
Message 6 of 6
(3,709 Views)