Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beginner question on OLE call
Message
 
À
15/05/2000 10:51:08
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00369596
Message ID:
00369602
Vues:
16
You can find help on the Office CD - File vbaxl8.hlp (and vbaxl8.cnt). This will give you all the properties/methods/events in Excel. You can also find examples of automation in the files section here at UT. I have one there for Outlook automation - you may be able to pick up tips from looking at the code (actual live implementations).

>Hello to All,
>
>I'm doing my first experimentation with OLE and up to now it's not a success :-(
>
>I tough I first try with basic command I foud in VFP help but even those don't seems to work for me. Here's what I found in help and tried:
>
>First trial:
>"For example, to create a Microsoft Excel worksheet (which supports Automation), you can use the following syntax:
>
>x = CREATEOBJECT('Excel.Sheet')
>
>When this code is run, Microsoft Excel is started (if not already running), and a new worksheet is created."
>
>This couldn't be simplier right? but when I tried it, Excell is not started. No error, nothing, I even check type("x") which return "O" so the object is created!
>
>Second trial:
>So I found also this in vpf help which I also tried without success.
>oleApp = GETOBJECT(, "Excel.Application")
>
>Third trial:
>I got this code from a UT user sometime last week. This works, Excell is open with the good spreedsheet.
>objExcel= CREATEOBJECT("Excel.Application")
>lcFile = "C:\Temp\Stock\Info.xls"
>objBook = objExcel.WorkBooks.Open(lcFile)
>objExcel.Visible = .t.
>
>Althrough this code works, I understand only part of it, where can I found information on "Excell" properties or method like .WorkBooks.Open()? I suppose that other interresting method exist, where or how can I see them?
>
>One thing I'm trying to accheive is to open Excell only if it's not running, otherwise, I would like to open the spreedsheet only.
>
>
>
>
>BTW: I'm using VFP 6.0, and Ecxell 97.
>
>
>Note: I applogize for such a long question, If somebody feels like ansewring only part of it, feel free.
>
>TIA
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform