DDEInitiate Returns 0 with Excel
Keywords: DDEInitiate Excel dde
Question:
I am trying to put certain information I extract from a text file in to a Excel Spreadsheet. I am not getting very far as I keep getting NO DDE channel.I tried:-
chan=DDEInitiate("EXCEL","SYSTEM")This always returns zero.I assume the Word System above means the Spreadsheet name or NOT. I have Office 97 installed on my Windows NT workstation with my winbatch EXE, Spreadsheet in the same directory on the server.
Answer:
- Your code should look something like:
run("excel.exe", "c:\temp\temp.xls") channel = DDEInitiate("Excel", "Sheet1")orrun("excel.exe", "c:\temp\temp.xls") DDEChan = DDEInitiate("Excel", "System") message("ddechan",ddechan)
- In Excel 5.0, select "Options | Tools | General", and make sure that "Ignore Other Applications" is NOT checked.
- In Excel 4.0, select "Options | Workspace", and make sure that "Ignore Remote Requests" is NOT checked.
DDEInitiate Returns 0 (it's case sensitive)
Question:
I like to make some DDERequest within a .wbt file towards an application supporting DDE. The following instruction returns an 0 error code:channel = DDEInitiate("fimsdde", "tdfprices")When I make a DDE-link directly within Excel without using WB (=DDE etc)everything goes well. Now I close Excel and re-run my WBT-file, now suddenly everythings works there as well.So my WBT-file only works if a previous DDE-conversation by Excel has been made. I experimented with delays with no results.
It's a direct DDE-Link like:
=FIMSDDE|TDFPRICES!'946681,148,22'where: FIMSDDE is the application TDFPRICES the topic '946681,148,22'the requested data itemIf I once open an Excel sheet with a link such as mentioned above and than close Excel, I can work all day fine with my WBT-DDE links, but once the machine is rebooted the problem re-appears, so it looks like Excel opens some links neccesary for DDE-conversation which stay open after exciting Excel and which WBT needs to operate properly.Answer:
Maybe it is case sensitive?Maybe try...
channel = DDEInitiate("FIMSDDE", "TDFPRICES")like in the Excel link.Reply:
I don't believe it, you hit it again ! That would be the last thing I would look for, strange things those computer :-)Thanks a lot !
Article ID: W12810Filename: DDEInitiate Returns 0 with Excel.txt