LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel doesn't quit on Excel2000demo, any way to fix this?

Excel2000demo shut down fine, but it stays in memory. This only happen after Read Data. Anyway to fix this?

BTW: I'm running CVI 7.1 and Excel 2000

Thanks,
Ngan Ly
0 Kudos
Message 1 of 7
(3,834 Views)
I'm having the same problem. Excel 2000 hangs. Its not that big of an issue until you have to do batch file writing using Excel. Anyone have any insight on the matter? I have a feeling that it is a problem with Excel itself, but I am not sure. Is there any work around (line of code) that anyone knows about where you can manually close Excel or just any windows application in general?

Thanks in advance.

P.S. I am running the same system as Ly
0 Kudos
Message 2 of 7
(3,815 Views)
I don't know if this will help you but perhaps it will help to point you in the right direction.

I did some work with the Excel Report object library used in CVI 7.0 and had the same problem initially of the application not closing. I found that even after you I used the ExcelRpt_WorkbookClose and ExcelRpt_ApplicationQuit functions (Or their equivalents) the Excel process still hung around unless i was very meticulous to use CA_DiscardObjectHandle to explicitly discard every active handle that I had (missing just one would leave the process running after shutdown). Discarding the object handles as well as closing the workbook and application seemed to help.
0 Kudos
Message 3 of 7
(3,808 Views)
Hello Ngan,

There is a thread that has two suggestions to eliminate this behavior. The thread, available here includes a modified excel2000dem.c and a suggestion to always clear the references before reusing them.

Scott Y
NI
Message 4 of 7
(3,800 Views)
Thank you Scott.
0 Kudos
Message 5 of 7
(3,771 Views)
I am having the same problem with the EXCEL process not stopping. I copied the code from the excel2000demo into my application. I then made sure I did a CA_DiscardObjHandle on all Handles including ExcelSingleCellRangeHandle. However the process does not go away after I quit the Excel application in my CVI application. I am using CVI 7.0 and Windows XP. Any help would be appreciated
0 Kudos
Message 6 of 7
(3,695 Views)
I found the answer. I needed to CA_DiscardObjHandle (&ExcelSingleCellRangeHandle) after each time I read a cell in the active range.
0 Kudos
Message 7 of 7
(3,669 Views)