Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE automation Excel - how to handle spaces?
Message
From
14/07/1998 10:57:06
 
 
To
10/07/1998 21:46:17
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00102943
Message ID:
00117149
Views:
22
I don't think your problem has anything to do with FoxPro or how you are using the SUBTOTAL() function in Excel. I am no Excel guru and you should probably take this to a forum that deals in Excel (let me know if you find a good one).

The way I read the syntax for the SUBTOTAL, the first parameter designates the arithmetic function that you want to perform and the rest of the parameters must resolve to a reference to a cell or range of cells. I am not sure what your .T. and .F. parameters are doing, but if Excel's array handling is anything like FoxPro's, then passing "Array(4,6)" to Excel is the same as only passing the first element of the array. In other words, you are only passing the 4. So even if Excel were able to understand "Array(4,6)" in this context, it might not give you any different results.

I am not sure what the solution to your problem is, because, as I say, I am fairly sure it is an Excel problem. I believe that your parameters are being passed correctly from FoxPro. I just don't think they are the parameters that Excel needs to achieve the results that you desire. My first instinct is to pass a line that reads more like:

RANGE("A1").CURRENTREGION.SUBTOTAL(1,D2:D6,F2:F6)

but that is just a shot in the dark.

Good Luck. I know you'll figure it out.
Previous
Reply
Map
View

Click here to load this message in the networking platform