11-28-2016 01:06 PM
I did some searching and have found a few examples on this topic, but am still having trouble with closing the excel application after it has finished reading the data in. (It stays open in the background). I believe the Application.Quit should work, but there are still errors and excel stays open. I have attached the sample VI that I am working with. Would someone be able take a second look or give some advice? Thanks
11-28-2016 10:15 PM
Well, I use the Report Generation Toolkit and avoid ActiveX. Here's how I would do this:
I open your file as a New Report, using Excel. I "Get Data" from cell A2 to cell M16 as a 2D array of strings, then I Dispose Report, which closes Excel. This suggests to me that perhaps there is a Close ActiveX command that you should use instead of Application Quit.
Bob Schor
11-29-2016 02:59 AM
Hi
It looks as if You're closing the Application reference before You use it on the Quit Application Invoke.
The Application reference branches in the beginning, and is fed to the last close reference node right before the Quit invoke node.
Hope it helps. 🙂
11-29-2016 06:29 AM
Hi again.
I've just tested the VI You uploaded, and found out that my Excel application didn't close as well.
I then expanded the first Application property node and added the property "Display Alerts", and wired a False Constant to it. This prevents the "Do You want to save Your Changes" dialog from popping up, which in turn prevents Excel form closing.
Hope it helps.