Python to replace Excel for DDE?

Hi,

I've searched around but couldn't find a satisfying answer.

Can I have a python script that access DDE data like Excel does? Are there any scripts floating around that do that?

I'm having difficulty accessing DDE data through Excel as it crashes every time, and Java is a likely problem.  I've tried changing permissions, firewall, user account settings, stopping Chrome etc.  One suggestion had to do with java 32 bit vs. 64 bit on windows 7 64-bit installations.

So, if a Python script won't suffer from Java interference/connection problems of DDE, then I'd like to do that.

Thanks!

Windows 7 Ultimate (&Pro)
Excel 2010
Java 7 32 bit & 64 bit
LVL 11
ugebAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
What exactly does this have to do with Java. How is Java involved with DDE in this case?
0
ugebAuthor Commented:
Because Java is implicated as the problem and that may be an important point for people to know.  I don't know whether answer involves Java or not.
0
CEHJCommented:
OK, but i think you need to tell us exactly what you're doing
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

ugebAuthor Commented:
What I'm doing is very simple.  I open up a trading application called ThinkOrSwim.  I then open Excel and in a new workbook I type the following formula:

=TOS|LAST!AAPL

which I've been told by ThinkOrSwim that this is a DDE link and I need to have the ThinkOrSwim app open.  However, that one little entry crashes Excel every time (Technically it hangs and won't respond so I have to kill it).

I found this link:
http://www.elitetrader.com/vb/printthread.php?threadid=237688

and I tried all the solutions I could, but nothing helped.  The only one I couldn't try was the one that involved Java, because I'm not sure what I'm supposed to do.  This link explains the Java as it relates to some app called TWS.

http://www.elitetrader.com/vb/showthread.php?threadid=175081

I don't know what to do with that info.  I don't know how Java is interfering with DDE on Excel, but no other suggestion worked.
0
CEHJCommented:
and I need to have the ThinkOrSwim app open.
And that's a Java app ..?
0
ugebAuthor Commented:
Well, I wouldn't have thought so, but it appears to be a Java app, or at least uses Java to some extent.  It's a pretty sophisticated app as it is a trading platform and requires stability.

It installs into the Program Files (x86) directory, and it appears to have its own jre subdirectory.  I already had both 64 bit and 32 bit Java installed for different apps, this app installed it's own version of Java in a subdirectory.  I guess it needs a specific version or just wants to make sure it has Java available?  Would it utilize the the other installed versions and maybe cause problems?

The readme file in the jre subdirectory in the thinkorswim installation folder says this:

Java(TM) 2 Platform Standard Edition
                        Runtime Environment
                            Version 5.0
0
CEHJCommented:
Well i know very little about DDE and it's an old technology. A java app seems an unlikely candidate to get involved in it since it's a native technology. Very late here so i shall return to this
0
Jackie ManIT ManagerCommented:
Have you tried to replace your formula?

from

=TOS|LAST!AAPL

to

=TOS|LAST!'AAPL'

Reference:

http://readtheprospectus.wordpress.com/2009/09/06/linking-excel-and-think-or-swim-for-streaming-real-time-calculations/

P.S.: When a command cannot find a result, the system will continue to execute the command again and again ("looping") and the user needs to manually terminate the looping process to stop the command.
0
ugebAuthor Commented:
Yes, I tried that and every combination.  It makes no difference, and others have gotten it to work with that syntax.

I believe it has to do with a 32 bit Java app running on a 64 bit machine with 64 bit Excel.  It doesn't give an error, it just hangs.  You can't break out of it, you just have to kill it. R.I.P.
0
CEHJCommented:
I believe it has to do with a 32 bit Java app running on a 64 bit machine with 64 bit Excel.  It doesn't give an error, it just hangs.  You can't break out of it, you just have to kill it. R.I.P.
I would say that's likely and would look into it. If you are right, it's highly likely that others will have had the same problem.
My immediate thought would be that you're going to be in (perhaps) with a better chance if you force the app to use a 64bit vm.

It would be interesting to find out if your app interfaces with OpenOffice too, since Java is the language of choice there for glue tech and macros.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ugebAuthor Commented:
I've been experimenting and haven't found any good solutions.

I know 64 bit Java is a problem, but I don't know how to force an app to use a different version and whether it would break that app.

However, my original question remains about whether there is a usable open source DDE library in python (or Java) with documentation and examples.  I haven't had much luck finding info.  I tried jdde but it doesn't have either good documentation or good examples and I couldn't get it to work.
0
CEHJCommented:
I don't know about available DDE apis. As i said, DDE is a very old technology so there's no future in it, particularly now we are in a 64 bit world.

You can also, because of my last observation, turn my previous comments the other way around: since DDE is ancient, it's possibly that it has not been updated properly to work in 64 bit environments. You could therefore try to install an old 32 bit version of Excel and see if you can get the DDE to work in that. Beyond that, i can't help i'm afraid.
0
ugebAuthor Commented:
Yes, I think it would work with 32 bit Excel, but that's not an option for me.  I just wish these trading apps would stop using such old technology.
0
CEHJCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.