Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't get Subtotal() to work via automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Can't get Subtotal() to work via automation
Divers
Thread ID:
00788448
Message ID:
00788448
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform