Solved

Delphi 3 commands to Excel 97 (via Ole)

Posted on 1998-08-26
4
501 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Graag gedaan. TTYL. :-) Zif.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

15 Experts available now in Live!

Get 1:1 Help Now