DDE running processes

Post Reply
User avatar
TimChaucer
Frequent User
Frequent User
Posts: 34
Joined: Thu Apr 12, 2012 6:27 pm
Location: Kent, WA USA

DDE running processes

Post by TimChaucer » Wed Feb 25, 2015 6:24 pm

We have been using DDE to export our data onto Excel forms for a few years, now. One thing that happens (and we never bothered to ask about it) is that in Win7 Task Manager, there will be multiple Excel processes running after few programs, even if we close the datasheets as we go. These processes persist until we either end them manually or close CMM-Mgr. We have suspected that they may build up and prevent new program runs from accessing their datasheets. On those occasions, we can't open an Excel file until CMM-Mgr has been closed and restarted. This isn't constant or a problem - and the permissions for the Excel files work fine. It would be nice to know what's happening, though.

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: DDE running processes

Post by US_Helpdesk » Tue Mar 03, 2015 1:29 pm

We are looking into this... We have had several reports of Excel not allowing our application to write to files (open or closed) and have had some issues with Excel files on Network (vs. local) filepath.

What OS, version of CMM-M and version of Excel do you have? Where are the Excel files? local or Network?
I've migrated to a new user account, see my other posts here

User avatar
TimChaucer
Frequent User
Frequent User
Posts: 34
Joined: Thu Apr 12, 2012 6:27 pm
Location: Kent, WA USA

Re: DDE running processes

Post by TimChaucer » Wed Mar 04, 2015 7:20 pm

windows 7 x64, CMM-M 3.4 sp1, MS Excel 2010. We access files on the local machine, at network addresses and at network locations mapped on the local computer, depending on the permanency of the project. We successfully call up .xlsx and .xls files from Excel 2003 to 2010, sometimes in compatibility mode. The machine that has the biggest problem is one that runs programs with DDE commands all day, mostly in batch mode. The operator sometimes leaves five or six different data sheets open. This doesn't affect the data transfer. Task Manager may have seven or eight processes called Excel running (more than the number of open datasheets). The processes seem to stay running until CMM-M gets restarted.

User avatar
TimChaucer
Frequent User
Frequent User
Posts: 34
Joined: Thu Apr 12, 2012 6:27 pm
Location: Kent, WA USA

Re: DDE running processes

Post by TimChaucer » Wed Mar 04, 2015 7:23 pm

One thing we noticed early - if somebody makes a manual change to the content of the datasheet, they need to hit save before the program runs a DDE command. Not saving immediately prevents CMM-M from writing to the sheet.

User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

Re: DDE running processes

Post by US_Helpdesk » Thu Mar 05, 2015 9:53 am

That's definitely a Windows imposed Read Lock... Nothing can be done about this, it is standard Windows behavior.
I've migrated to a new user account, see my other posts here

User avatar
TimChaucer
Frequent User
Frequent User
Posts: 34
Joined: Thu Apr 12, 2012 6:27 pm
Location: Kent, WA USA

Re: DDE running processes

Post by TimChaucer » Thu Mar 05, 2015 11:32 am

We eventually learned to use the Customer Data area of the report to put the lot no, etc. on the report form. Nobody has to make manual entries directly to the sheets, now.

Another thing we noticed was how changes in the company network required us to re-enter the permissions and the Excel security/sharing settings. That caused a couple of "Concern Events."

ccaiazzo
New User
New User
Posts: 2
Joined: Thu Dec 11, 2014 3:24 pm

Re: DDE running processes

Post by ccaiazzo » Sun Apr 01, 2018 1:25 pm

I am running 3.7sp1
I will get multiple instances of excel.exe until it uses all the system resources and locks up the PC
I try to teach everyone to close cmm manager every shift but sometimes they forget
Then we have hold the power button to reboot the PC because we cannot do a normal shutdown at that point

shaunmdonahue1
New User
New User
Posts: 1
Joined: Fri Oct 05, 2018 5:59 pm

Re: DDE running processes

Post by shaunmdonahue1 » Wed Apr 24, 2019 2:02 pm

Found a fix!
I've been having this problem since I started using CMM Manager. I always check the box "view by MS Excel after program execution" in the first DDE input so that the spreadsheet opens automatically for review after each run and I suspect that this is why. I would prefer to just leave the spreadsheet open and watch it populate all day, but most times I need to actually edit the thing as I go and this causes other more annoying conflicts (such as the file turning "read only" and refusing to save my changes, or saving a duplicate copy to a random location upon DDE execution, or retarding the DDE link altogether and killing my batch run). To get through this, I just make my changes and close the spreadsheet after each run and before the next time DDE executes. Then I open task manager once a day and close all the excel files that stack up there one by one; it's a chore. If I don't, after a couple dozen or so pile up, bad things start happening to my PC. Found a solution yesterday though! Taskkill.exe. Just threw it on my desktop, give a quick double-click, and boom! All excel background files closed.
After reading the posts above, I felt compelled to share my excitement of this glorious discovery. Hope it helps anyone reading this.

User avatar
CrashN8
Site Admin
Site Admin
Posts: 371
Joined: Thu Feb 09, 2017 4:07 pm

Re: DDE running processes

Post by CrashN8 » Tue Apr 30, 2019 3:02 pm

You could try to kill Excel in a more elegant fashion via VBScript... something like this might help:

Code: Select all

set OExcel=CreateObject("Excel.Application")
OExcel.Quit
I had similar problem with DDE and Excel recently however I was also calling Excel.exe using CMM-Manager External Command for post processing Excel format into XML - details here - viewtopic.php?f=48&t=3298

Post Reply