Board index » delphi » Talking to Excel by means of DDE? HELP!

Talking to Excel by means of DDE? HELP!

Hello world,

I'm trying to communicate with Excel - that is, I'm trying to read some
cell's values. But I can't even establish a DDE link to the program. I'm
using Delphi 3 and tried the following code:

procedure TForm1.Button1Click(Sender: TObject);
begin
   DdeClientItem1.DdeConv := DdeClientConv1;
   with (DdeClientConv1) do
   begin
      DdeService := '\MSOffice\Excel\Excel';
      ServiceApplication := '\MSOFFICE\EXCEL\EXCEL';
      DdeTopic := 'Vbalist.XLS';
      ConnectMode := ddeAutomatic;
      if (OpenLink) then
      begin
         RequestData(DdeClientItem1.DdeItem);
         Caption := DdeClientItem1.Lines.Strings[1];
      end
      else
         Beep;
   end;
end;

And I've tried different variations for the DdeTopic property. Can
anybody please tell me what I'm doing wrong? And also what kind of
topics are available when working with Excel?

Thanx in advance!

Omar Dekker.

 

Re:Talking to Excel by means of DDE? HELP!


Quote
om...@frens.nl wrote:
> Hello world,

> I'm trying to communicate with Excel - that is, I'm trying to read some

There are a couple of Excel components on the delphi super page that do a
fine job of this.  I believe they're called Excel  and AdvExcel.

Bob Lee

Re:Talking to Excel by means of DDE? HELP!


There are a bunch of shareware components to do this.  See the
DSP.

-John_Mer...@Brown.EDU

Re:Talking to Excel by means of DDE? HELP!


Quote
: om...@frens.nl wrote:
>I'm trying to communicate with Excel - that is, I'm trying to read some
>cell's values. But I can't even establish a DDE link to the program. I'm
>using Delphi 3 and tried the following code:

Try T(Adv)Excel (written by me), available from all major Delphi
archives. Freeware with source code, Delphi 1-3, BCB 1.0 (3.0 not
tested yet)

This component makes DDE communication with Excel 4-8 really easy.
--
mailto:Stefan.Hoffmeister (at) Uni-Passau.de
http://kakadu.rz.uni-passau.de/~w4hoff01/
   DIR: Delphi FAQs, KBs, docs
   PGP public key at homepage

Re:Talking to Excel by means of DDE? HELP!


Our own DDE component - 'Django' - includes special support for the
Excel 'xlTable' data format for rapid transfer of data cell values to
and from Excel.

You can download an evaluation version from our web site at...

    http://dspace.dial.pipex.com/town/estate/ns21/icfmdc.htm

Regards,

        .... ICFM Software

--
 - Davout dav...@dial.pipex.com

Other Threads