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: 

excel report generation does not exit excel

Solved!
Go to solution

@Nathan-M wrote:

We're kind of like Beetlejuice!


I figure any post that gets 20 replies in a day is probably on NI's radar, and figured someone would pick it up eventually.

 

In the past the only way I've had a CAR created from something not seen on the forums, was when I call NI with our support contract and describe the issue.  This usually evolves into NI trying stuff, and several emails back and forth with VIs to try stuff.  Once NI is convinced it is a real issue the hard part is over.  Again I don't blame NI I'm sure they get people all the time (some times me) that swear up and down it is a bug and it turns out it was user error.

0 Kudos
Message 21 of 33
(2,938 Views)

I am experiencing the same problem with LabVIEW 2013 (32-bit version) & RGT on 64-bit Windows 7, & Microsoft Office 2013 and as far as I could understand from this thread, a CAR was going to be created, did that ever happen? Or my only solution is to kill the process myself?

0 Kudos
Message 22 of 33
(2,845 Views)

I'm sorry that I didn't see the original posting.  I use the RGT to read/write Excel all the time and have never had this problem.  Looking at the original code that was posted, I think the problem is being caused by using the "No Change" option on the New Report -- if you want to not "see" Excel, use "Minimized".

 

It is possible that no CAR was created because there was nothing to fix.

 

Bob Schor

On my way to Austin, if the arilines will get me thre (currently "stuck" in Baltimore ...)

0 Kudos
Message 23 of 33
(2,781 Views)

From the solution given instead of searching for the specific system PID and closing execel through that portal. I found that you can use activeX to quit the application after saving the report. The attached vi snippet reflects this implementation and I have verified its operation in my application.

Message 24 of 33
(2,686 Views)

I don't understand why someone would post a "fix" to something that is not a problem, particularly three months after the subject had been closed.

 

I just ran a test to be sure I didn't miss something -- if you use the Report Generation Toolkit properly, you do close Excel when the report is "Disposed" (that's the purpose of that function, after all).  

 

I did notice that while the LabVIEW Program was executing (after it had opened and closed Excel), there was still an Excel "Process" (not Task -- Excel wasn't running, but LabVIEW was holding on to some "hooks", I gather, into Excel) that didn't go away until the LabVIEW program itself left memory.

 

Bob Schor

0 Kudos
Message 25 of 33
(2,669 Views)

Any progress on this issue?

 

I am using the Application Quit invoke nodes, as suggested by "jtraw".

 

But the report generation toolkit should have this functionality. It's so basic.

Vaibhav
0 Kudos
Message 26 of 33
(2,592 Views)

Why is it that every three months or so, someone asks how to exit Excel when (an) answer has already been posted?

 

I (and others) have described a method that seems to work.  Yet you are having a problem, probably because you are doing "something else".  If this is the case, it behooves you to show us what you are doing and let us "play with it" to either (a) fix it, (b) show you why it doesn't work, or (c) show you another way to do the same thing.

 

You need to attach executable LabVIEW code.  This is most easily accomplished by attaching a VI (or, if you need to attach several VIs, put them in a Folder, Compress the Folder, and attach the ZIP file).

 

PLEASE -- to anyone else reading this post three months from now -- read all the responses, especially those that say "There is nothing to fix, it works properly".  If you, nevertheless, do find a bug/serious problem, provide example code so we can take a look.

 

Bob Schor

0 Kudos
Message 27 of 33
(2,579 Views)

Hi Bob,

 

Calm down sir! Smiley Happy

 

I have read all the posts in the thread, and only after that I posted.

 

I have also mentioned that I am applying the same workaround as suggested earlier. But I am asking if there is already a function in the latest version of LabVIEW, that allows to close the excel report (or perhaps, not open it in the first place, just write the file in the background and silently).

I am using 2013 SP1, so not updated since a couple of years (don't know why we stopped getting updated packs in the department).

 

 

Thanks!

Vaibhav
0 Kudos
Message 28 of 33
(2,570 Views)

If you have the "bare-bones" LabVIEW 2013, you do not have access to the Report Generation Toolkit that, as I noted, seems to handle this problem with ease.  However, LabVIEW 2014 and LabVIEW 2015 include this Toolkit with the base LabVIEW installation.  Thus if you (a) upgrade to LabVIEW 2015, and (b) replace your ActiveX code with the simpler functions in the RGT, taking care to open and close the Reports properly (I think I described the steps in an earlier reply), then this should solve your problem.

 

Bob Schor

 

P.S. -- one benefit of posting your code is we can determine the version of LabVIEW you are using.  You mentioned the RGT in your post, so I assumed (possibly incorrectly) that either (a) you had the Toolkit and were having a problem with it, or (b) you had LV 2014 or 2015.  Code would have clarified the issue, and possibly led to a simple "fix" ...

Message 29 of 33
(2,539 Views)

My apologies.

I had used that "Close" option in the Dispose Report VI, but in my initial program I had it "False".

 

And in the later programs, somehow, I do not know what happened, but it didn't close. I must have some other error or whatever. So I thought the option doesn't function. And I thought the option was for to close the report manipulation, and not close the window.

 

But just set it to T (or left it without anything, as the default is T), and it closes. Removed those workaround things.

 

I didn't post the code because I was just quickly replying the message, and didn't have time to post a sample code out of the application without dependencies.

But I usually post questions with my code only.

 

To show my mistake, posting the program here.

 

Thank you and sorry again for the confusion. Graph Scale.png

In that second last node, if I remove the boolean constant "F", the report file is closed.

Vaibhav
0 Kudos
Message 30 of 33
(2,515 Views)