🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #340

OLE with Excel

#340
From: Rob_Johansen
Date: Wed, 10 Sep 1997 00:00
37 lines
2497 bytes
Please help! I am learing about OLE for a project tha I am starting.  I
will need to be interfacing with Excel. First things first, can people
recommend a good book or other sources of information on OLE automation
with Excel?  Specificly, for right now, I need information on using the
OleContainer and the OleObject with Excel.  Almost all examples I have
are for Word.

My current problems: (after only 3 days) 1)  With the OleContainer.  How
do you deactivate the container?  If I issue a DoVerb(ovHide), it hides
the spreadsheet, but leaves the container active, Excel menus and all.

2)  With the OleObject.  Similar problem.  when I do a v.Quit (v =
variant) after I have done something to the spreadsheet, Excel will not
quit without asking if I want to save the changes.  I don't want to.  I
know that doesn't make sense on it's own, but it does in "the big
picture".  Can I tell the Excel dialog (or assistant) 'No", can I tell
Excel to quit without asking?

3)  Connecting the two.  I want to use oleautomation on an Excel
OleContainer by using the OleContainer1.OleObject.  The only example I
have is for Word:  var	v : Variant;  begin 
OleContainer1.DoVerb(ovShow);  v := OleContainer1.OleObject;  v :=
v.Application.WordBasic;  {<- note: no '.' in WordBasic } 
v.Insert('text');  end; I have tried to replace the "WordBasic" with
"ExcelApplication", "ExcelSheet", "ExcelApplication8",
"Excel.Application", "Excel.Sheet", etc.  All that happens is that my
application seems to lock up.

I would appreciate any help with this,	even though I know that they are
probably stupid questions.

thanks,
  --Rob

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Technical Details
Message-ID: <873908115.17313@dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10baee,6cedd6b603d1c1f8,start
X-Google-Attributes: gid10baee,public
X-Google-Thread: fd196,6cedd6b603d1c1f8,start
X-Google-Attributes: gidfd196,public
From: Rob_Johansen@grandcasinosinc.com
Subject: OLE with Excel
Date: 1997/09/10
Message-ID: <873908115.17313@dejanews.com>
X-Deja-AN: 271183151
X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.02; Windows 95)
X-Originating-IP-Addr: 208.143.49.254 ()
Organization: Deja News Posting Service
X-Authenticated-Sender: Rob_Johansen@grandcasinosinc.com
X-Article-Creation-Date: Wed Sep 10 16:15:17 1997 GMT
Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.oleautomation