Important: Please read the Qt Code of Conduct -

How to get DDE data?

  • Hi everyone! There is an application that transmits data via DDE to Excel spreadsheet. I need this data in my Qt application. Is there a solution how to get data directly from the application, rather than from a Excel. Is it possible to solve this problem by using QAxObject?

  • Any ideas?

  • You should give people a bit more time than 4 hours to comment on your problem. Thank you.

  • Afaik DDE on windows is event based. I have no experience with it, but you can catch DDE events like all windows events ("winEvent()": ?!).

    On the other hand, it depends on the application if you can get the data directly. DDE is a point to point protocoll (Direct Data Exchange) that is based on windows events. So how would you intercept it?

    So first of all you need to know the interface of the data server application. Or you have to read it from excel.

  • to Gerolf:

    I tried to read it from Excel and I read the value from cell but the value is constantly updated so I can't refresh it in my lineEdit item. Data server application uses DDE format ("Server|Topic!Item").

  • But the server send to excel, right?
    Otherwise connect yourself to the DDE events and read them.

  • to Gerolf:

    Thanks for your reply!

    Right, the server send data to excel. So how can I connect to the DDE events? With QAxObject?

  • If the server always send data to excel, you can't.

    its a point to point connection. the only thing would be a man in the middle attack, which is not what you want, I'm pretty sure :-)

    QAxObject is COM, not DDE. The DDE sink is Excel, not your application. Try to connect to the server app via DDE if that is possible, otherwise I have no idea how to intercept events from DDE.

Log in to reply