Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation of Excel under IE
Message
De
18/11/2004 11:36:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/11/2004 10:58:53
Tim Muller
Innovative Solutions, Inc.
West New York, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00958541
Message ID:
00962680
Vues:
33
>Cetin--
>
>>Before the Range itself is oExcel really an accesible object? I don't know what would GetObject() call would return if on those particular computers you're not allowed to automate Excel. It might be returning w/o an error though you're not allowed (typical with Dell computers where Office is preinstalled and automation is not allowed via security).
>>Test this on those computers:
>>
>>oExcel = createobject("Excel.Application")
>>or:
>>type("oExcel.Application")
>>
>>I suspect those 2 would return access denied -80004001?- errors. You might fix it:
>>Start\Run\dcomcnfg
>>Dblclick:
>>Component Services
>>Computers
>>My Computer
>>DCOM Config
>>Locate Microsoft Excel.Application, right click and select properties. Check security and identity tabs.
>>
>>PS: I suggest not to use GetObject() but createobject().
>
>Excellent suggestions. Thanks. It will probably be early next week until I get back to the client site and try this. Unfortunately, I did not make completely clear in my last post what is happening.
>
>On a machine that is failing, if I bring up Excel normally (i.e., it is not running in Internet Explorer), oExcel.Range is an object and VFP can pull data from a spreadsheet using Automation just fine. On the problem machines when the Excel that is running is running in an IE window created by the web site, oExcel.Range is not an object (but oExcel is an object and VFP Intellisense is acting as if I have a normal Excel).
>
>I am using GetObject() because I want the Excel that is currently running. If there is no Excel running when my app is started, the user has made an error (and is so informed).
>
>On all 20+ client machines (both machines where my stuff works and machines where my stuff does not work), there is clearly something different about Excel running under IE (or at least when it is called by this web site). If nothing else, the Excel menu is diferent than the normal Excel menu on the same machines. If the menu is different, then it does not seem unreasonable to me that the object model is different. I just wish I understood more so I could make this stuff work!!
>
>I suspect that you are on to something with your comments about Dell. Auotmation of Excel works on all machines, but on the 2 machines where my stuff does not work, there is probably something different about Excel or IE. I think their IT guy installed Excel himself. I will have him reinstall it on the problem machines.
>
>Thanks again.
>
>Tim

Tim,
I was somewhat careless on my first reply. Object model is same but when it's Excel.Application type('oExcel.Range') should be normally undefined. For Application AFAIK range syntax is:
Range(cell1,cell2) where cell1 is required.
Menus being different might explain it. One might be just excel.application with no workbooks and other with a sheet (or might it be one is running OWC.spreadsheet?).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform