garrett@brahms.udel.edu (Joel Garrett) (01/11/91)
Hello all, I have a question regarding DDE, specifically pertaining to the DDE section of the Petzold book (Chapter 17). The first example in this chapter is that of calling a DDE server from withing Excel. Well, we plan on getting Excel for Windows, but I'd still like to experiment with what we currently have which happens to be the Windows version of Wingz. Can I just type in the same info into an Wingz Spreadsheet cell (=DDEPOP|US_ Population!US) and have the same result? Also, is it possible to send messages in the opposite direction as in this example so that, for example, I could have a DDE client start up excel, have excel open up a file that had been specified in an earlier dialog in the client possibly perform some simple transformations and then send the transformed data to the client for further use? Is it possible to send commands and such to Excel from the client to do things like execute excel commands and macros and such? I assume there would have be some documentatio somewhere of the standard Excel DDE Topics and Items? Thanks in advance for any suggestions you might have... Joel Garrett garrett@brahms.udel.edu
goodearl@world.std.com (Robert Goodearl) (01/13/91)
In article <17497> garrett@brahms.udel.edu (Joel Garrett) writes: >Hello all, I have a question regarding DDE, specifically pertaining to the DDE >section of the Petzold book (Chapter 17)... > >Can I just type in the same info into an Wingz Spreadsheet cell (=DDEPOP|US_ >Population!US) and have the same result? Can't help you with this one, what does the Wingz doc say about DDE macros? > >Also, is it possible to send messages in the opposite direction as in this >example so that, for example, I could have a DDE client start up excel, have >excel open up a file that had been specified in an earlier dialog in the client >possibly perform some simple transformations and then send the transformed data >to the client for further use? Yes. Any program can be either a client or a server, or both. Excel supports DDE as both a client and a server. Though I've only seen Word-for-Windows documented as being a server, apparently it also provides some client services. > Is it possible to send commands and such to >Excel from the client to do things like execute excel commands and macros and >such? Yes > I assume there would have be some documentatio somewhere of the standard >Excel DDE Topics and Items? Excel (and many other DDE _server_ applications) advertise the standard topic "system." Many general services are available under this topic. Otherwise, you can assume each open spreadsheet will answer to a topic of the same name (as long as the "Ignore Remote Requests" box is not checked from the Options/Workspace menu" -- available only when full menus are set.) There is documentation available, but my Excel docs are at work so I can't direct you. I know that there are some macros specifically for DDE. **************** If you are going to write an app that supports DDE, I suggest you play with the sample apps (both client and server) that come with the SDK. I also HIGHLY recommend the shareware program DDEWatch by John Hauck of Horizon Technologies (75226.3136@compuserve.com -- tell him I sent you.) This DDE message monitor was invaluable to me when writing DDE support for the Windows version of EASEL. Horizon also has a DDE support DLL that they sell. If you're writing an app that needs to support DDE it's well worth your time to check it out. The feature list looked good to me, but I had special constraints in writing support for a language that didn't allow me to use it. I'm in the process of writing an introductory paper on DDE. Though it will have specifics of EASEL support for DDE, I think there is enough general information to be useful to someone trying to understand DDE. If you'd like a copy, let me know. (If enough people ask, I'll see about posting it here.) It'll be done by mid February. -- Bob Goodearl -- goodearl@world.std.com
goodearl@world.std.com (Robert Goodearl) (01/13/91)
In article <17539@brahms.udel.edu> garrett@brahms.udel.edu (Joel Garrett) writes: ... > I am assuming that you >can work with a range of cells by using the same range notation that you would >use in a worksheet formula, ie a1..a7 or the like... I'm not sure if there are multiple notations that it will accept, but I know that you can use Row Column addressing. ie: R1C1 or R2C4:R3C5 > There is absolutely no mention of DDE in >either the online or printed docs for the Windows version of Wingz. The SDK sample client app can enumerate all the available DDE servers. A good indication of Wingz support for DDE would be to start it up, run the SDK client app and enumerate the servers. If it supports DDE it should show up in the list. > >Is there an easy way to send commands to Excel (ie multiply all cells by >some value and then add another value to each and then return the result via >dde?) > No easier than doing the same operation from within the spreadsheet. Generally the easiest way to send data to Excel is to use the WM_DDE_POKE message from your client app. Then you could use the WM_DDE_EXECUTE message to tell excel to execute the macro which causes your required operations to happen. If you want to get fancy, you could POKE the macro(s) and then EXECUTE. Finally you use WM_DDE_REQUEST to get the data back. -- Bob Goodearl -- goodearl@world.std.com