LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel won't close

I write a LabVIEW program to read and write values to excel. The problem is that it looks like excel isn't closed after the program runs. Also, excel file goes read-only after I run my LabVIEW program for several times. When runnging the program, I also get a prompt "Excel is already opened, reopenning will make...." something like this. How do I get rid of this prompt and close the excel file properly?
Download All
0 Kudos
Message 1 of 4
(3,125 Views)
I believe that you forgot to include the "Open Excel Worksheet" VI. I tried to open these to test them but that subVI was missing so I can't run it. One suggestion I have would be to purchase the Report Generation Toolset for Microsoft Office. This toolset includes Office specific VIs that perform all of the ActiveX calls for you. It makes life much easier when you are working with Office fairly often. Without being able to run your code, it's a little difficult to guess what might be happening. However, here is an example VIs from NI's website which might help you out.
J.R. Allen
0 Kudos
Message 2 of 4
(3,125 Views)
You've made use of most of the shipping example except for the part about quitting Excel. Look at the example again and you'll see the two methods - Workbook.Close and Application.Quit.
Message 3 of 4
(3,125 Views)
You also left out the method to save the file. That is why reopening will lose the changes made to the workbook that is already open. Wire the method node to the Workbook reference to find this option.

Michael
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 4 of 4
(3,125 Views)