Solved

Delphi 3 commands to Excel 97 (via Ole)

Posted on 1998-08-26
4
504 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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