LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Open and Automation Close (Excel)

Hi
I am using ActiveX to write and read from Excel.
I am writing a program which a case statement is involved. When the boolean is true, the program in the case statment (View Result.VI) will open Excel and display the last save filename file. I run this program individually and not part of the main.vi program.

It displays the filename but once I close the file, the Excel also closed which I don't want it to do that.
I run my Main.vi (together with the View Saved Result.vi) and when I want to view the result, the program open Excel, but then, the screen hang and does not load the Excel properly. But when I run the View Saved Result.Vi, it does load properly.


I was wondering should I use Automation Close f
or every Excel workbook, worksheet or Invoke nodes which I have used in my program.

Please look at my JPEG file for understanding.

Thanks,
jun
0 Kudos
Message 1 of 2
(3,009 Views)
I would not call Automation Close for each one. Once you call Automation Close, Excel will exit. That's just how ActiveX is built to work. As long as you want to leave the application open, you shouldn't close the ActiveX Automation controller.

I would actually suggest gettings the LabVIEW Report Generation Toolset for Microsoft Office. I have found it to be extremely helpful and it's actually quite easy to do what you're wanting to do with this Toolset.
J.R. Allen
0 Kudos
Message 2 of 2
(3,009 Views)