Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get Subtotal() to work via automation
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Can't get Subtotal() to work via automation
Miscellaneous
Thread ID:
00788448
Message ID:
00788448
Views:
68
Hi all -

I've set up a routine that uses Automation to open Excel (with a worksheet), do some formatting and save the changes. I am having a problem though getting Subtotals (what you would normally get when Data, Subtotals in Excel) via automation. I am trying code like:

low.Cells.Subtotal('groupBy:=1', 'function:=xlSUM', 'TotalList:=Array(10,1)', 'Replace:=True', 'PageBreaks:=False', 'SummaryBelowData:=True')

low is an object reference to the worksheet.

When I run the above I get an error dialog stating: OLE IDispatch exception code 0 from Microsoft Excel: Unalbe to get the Subtotal property of the Range class...

Can anyone help?
________________
_____/ Regards,
____/ al

___________________________________________
www.jcn-associates.com
Visual FoxPro Database Application Development and IT Project Management
Next
Reply
Map
View

Click here to load this message in the networking platform