Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi 3 commands to Excel 97 (via Ole)

Posted on 1998-08-26
4
Medium Priority
?
510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 300 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 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