Solved

Delphi 3 commands to Excel 97 (via Ole)

Posted on 1998-08-26
4
503 Views
Last Modified: 2012-06-27
I have a serious question on my mind, and I hope somebody can help me with this.
I know how to communicate with Word 97 from within my Delphi projects, i.e. opening an Olé-object to WordBasic and issue some WordBasic commands from there.

Now, I want to be able to do the same thing with EXCEL.
The only thing is, WICH Olé-object do I need to open and WICH commands are to my disposal once the connection is made ????

Can some-one help me with this ????

With many thanks in advance,
and kind greetings from Belgium

TTYL,

Eddy Praet

E-mail: eddy.praet@advalvas.be

0
Comment
Question by:epraet
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1337845
Dag Eddy,

Beste groeten uit België.

Wat is TTYL? Als ik vragen mag...

Ok, we'll talk in English, so everybody can follow this thread :

Starting OLE communication is just one line, transferring data is as easy as a snip...

 Well, I can give you some more information about this :

    ExcelApp: Variant;

    To open Ole connection :

    ExcelApp:= CreateOleObject('Excel.Application');
    ExcelApp.Visible := True;

    To Close OLE connection :

    ExcelApp.Quit;

    To send data to active cell in Excel :

    try
      ExcelApp.ActiveCell := 1; {active cell is filled with number 1}
     except
      on E:EOleSysError do begin
       showmessage('OLESysError '+E.Message+IntToStr(E.ErrorCode));
      end
       else showmessage('unknown error, please report : ');
     end;


It's as simple as in Word...

A good article is this one :

http://members.aol.com/charliecal/ 

go to OLE automation: Delphi, Word and Excel.

-----> READ THIS ARTICLE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

--> very good explenation on how to get the commands you can use by OLE.

further, i advice to look at some components there are some good ones with learnfull code.

Regards, Zif.

If you need more, just ask!

Nog een goeie avond verder en tot morgen?

Finally some Dutch in expert-exchange!!

0
 

Author Comment

by:epraet
ID: 1337846
Hartelijk dank voor je responce ! :-)

E-Mail me at: eddy.praet@advalvas.be

Groetjes uit Wilrijk

Eddy

PS: TTYL = Talk To You Later... :-)

0
 

Author Comment

by:epraet
ID: 1337847
Hartelijk dank voor je responce ! :-)

E-Mail me at: eddy.praet@advalvas.be

Groetjes uit Wilrijk

Eddy

PS: TTYL = Talk To You Later... :-)

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337848
Graag gedaan. TTYL. :-) Zif.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now