Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation - How to find AVERAGE function
Message
From
11/07/2003 09:29:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00808999
Message ID:
00809181
Views:
29
>Hi all -
>
>Referencing http://support.microsoft.com/default.aspx?scid=kb;en-us;265731 I was able to do exactly what I wanted to do with an Excel file.. well almost. That Microsoft article shows how to use automation to create a subtotal, eventually using:
>
>oSelected.Subtotal(1, xlsum, @laArray, .T., .F., .T.)
>
>where xlSUM was #DEFINEd as -4157.
>
>This is great, but I want to use the AVERAGE function. So it seems I need to find where I can see all the function names (is it oSelected.Average()? and all the values for the second argument (which I assume may or not be the second argument depending on the function). I looked in the Visual Basic macro editor help (based on a posting here), and that helped, but I didn't find what I think I need.
>
>Where should I be looking??
>
>Thanks!

If you're using a version prior to VFP7,
-open any office app
-Press Alt+f11 then f2 and type your constant's name (xlAverage in this case) [enter]
-Value is dipslayed at bottom

If you've VFP7 or later, use object browser, load Excel type lib, open a new code window, drag&drop 'constants' node to create a .h fiel for use with excel automation.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform