Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDEInitiate and Excel

Status
Not open for further replies.

simo

Instructor
Dec 5, 2000
18
0
0
US
Hiya, I am trying to use the DDE functions to program Excel from Fox for Windows 2.6, however, the DDEInitiate command fails and cannot start Excel under Windows 9.x / 2000.

I therefore resorted to run /n start excel.exe and then making the connection, which is cool in 9.x , however, under Windows NT, I cannot get this command to work.

I was just wondering if anybody new a method of finding the absolute path location of Excel so I could start it that way...

Cheers.. Simon.
 
I had that problem too. Foxpro 2.6 doesn't have compatible DDE commands for later versions of MS Office or Windows, I think. I tried it with MS Office 97 - unsuccesfully
 
Hi, you have to make sure that exel is running prior to ddeinitiate.

In order to do so you need to start exel (logic so far)

You could retrieve the exel location from the registry, (using for example the call32.dll from Rick Strahl) or store the path to excel ones during init of your app.

I store the path to excel in my app ini file and read this out during my dde stuff.

let me know if this hlps
 
Hi cheers for your help! This is so long ago I'd forgotton about it.

What I ended up doing is what you suggested really, I stored the path to excel in the .ini file of my app, so I could find it there.

The spreadsheet was only going to be run on one computer, so I could afford to hardcode the path in the .ini, but looking it up in the registry prob is the best solution for running on multiple machines.

I started with Fox 6, so programming for 2.6 is a lot different!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top