To download NI software, including the products shown below, visit ni.com/downloads.
Using invoke nodes you can programmatically close a Microsoft Excel workbook via LabVIEW. This example demonstrates how to first save and then close an open Excel workbook using its name.
Description
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
Note: You cannot use this example on RT targets. ActiveX is a Windows only technology and not available on RT targets.
Workbook.SaveAs Method (Excel)
https://msdn.microsoft.com/de-de/library/office/ff841185.aspx
Workbook.Close Method (Excel)
https://msdn.microsoft.com/de-de/library/office/ff838613.aspx
Application.DisplayAlerts Property (Excel)
https://msdn.microsoft.com/de-de/library/office/ff839782.aspx
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
I have tried to do this in my application, but when I check on Windows Task Manager, Microsoft Excel is still opened.
What can I do for avoid Microsoft Excel still be opened (but not visible from the Windows Task Bar?
Same Question for me as above. Excel seems to be closed after running my application but is still opened in the task manager and I can't open Excel again to read the file because it is still in use. I use the Dispose Report.Vi from the toolbox.