OLE is the best track to take.
DDE is a bit slow.

Basically if you convert the VB demo to Delphi it will be pretty close to
idential in the commands you use, with one exception, Vb uses CREATEOBJECT,
Delphi uses CreatOLEObject
and you wil lneed to include ComObj into your Uses Clause too.

I.e.

 var
  XLObj XLObjWorkSheet :Variant;
 begin
  
  XLObj:=CreatOLEObj('Excel.application');
  
  XLObjworksheet:=XLObj.WorkSheet;  
 
  XLObj:=unassigned;
  XLObjWorkSheet:=unassigned;
 end;

Or somehting LIKE this...did this from Memory, but you should see how to
convert from VB to Delphi from this....I hope.

If you still have probs, email prvtly ([EMAIL PROTECTED]) and I will help you
with a BETTER example....

Cheers,

Jeremy Coulter
Application Developer

Application Development Centre
Compaq Computer New Zealand Ltd.

Phone:  64 3 371 5724
Fax:            64 3 371 5724
Mobile:       64 0212533214
E-mail: [EMAIL PROTECTED]       
Personal Email: [EMAIL PROTECTED]



-----Original Message-----
From: Bird, Geoff GD [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 20, 1999 4:14 PM
To: Multiple recipients of list delphi
Subject: [DUG]: Accessing Excel Data


Gentlemen

I recently saw a demo (using VB) where an Excel S/S was called, a couple of
numbers poked in, and the outputs pulled out.   If VB can do it, I'm sure
Delphi can too !! 

I have a situation where I want to access an existing S/S, and to input data
& receive back results ...

I've not done anything like this before.   Where should I start ?   DDE ?
OLE ?   Does anyone have a sample app or snippet of code that would help ?
I have several Delphi books, but doesn't really help me on this one.

Any attachments can be sent direct to me at [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 

Thanks in advance.
Geoff



EOM 

NOTICE - This message contains information intended only for the use of the
addressee named above.  It may also be confidential and/or privileged.  If
you are not the intended recipient of this message you are hereby notified
that you must not disseminate, copy or take any action in reliance on it.
If you have received this message in error please notify The Broken Hill
Proprietary Company Limited immediately via mailto:[EMAIL PROTECTED].
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to