ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep Excel opened even though VI is running

Solved!
Go to solution

Hello, 

 

I'm making some code for Excel manipulations based on Report Generation Toolkit. But whenever I run VI Excel application is always closed. Tried to find where can I set the option but couldn't.

Could you tell me how to keep Excel open when run the VI?

 

Thanks in advance.

Best Regards,
-----------------------------------------------------------------------------------------------------------


0 Kudos
Message 1 of 4
(2,631 Views)

If you look inside the Excel instance of "Dispose Report", you will find a constant that always closes the application (hidden underneath a comment). 

Capture.PNG

Message 2 of 4
(2,621 Views)
Solution
Accepted by topic author gooohestpoo

Sorry I read that wrong, it actually closes the current workbook, and then leaves the application open, if you have some other active workbook.

 

Capture.PNG

Message 3 of 4
(2,620 Views)

The RGT, like Excel itself, distinguishes between saving the Workbook (as it is called in Excel) or Report (as it is called in LabVIEW) and closing Excel.  As I experienced all too often in Excel, you can open a Workbook, make lots of changes, close Excel, and realize that you forgot to save the Workbook, so you have to re-open Excel, remake the changes, save the Workbook, then close Excel.

 

In LabVIEW, you do Save Report to File to mimic Save the Workbook.  You do Dispose Report to mimic Close Excel.  If you Dispose without Saving, your Excel File will be as it was when you started, i.e. unchanged.  If you Save without Disposing, Excel will still be open (and your Report will still be present, ready to be further modified and re-Saved).

 

Bob Schor

Message 4 of 4
(2,585 Views)