Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel PivotFields('field').SubTotals = Array()
Message
From
06/12/2001 11:12:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel PivotFields('field').SubTotals = Array()
Miscellaneous
Thread ID:
00590580
Message ID:
00590580
Views:
96
By default a pivottable will create subtotals for all the groupings. In one of my reports I want to turn off subtotals. I recorded a macro in Excel and it returned the following code:
ActiveSheet.PivotTables("PivotTable").PivotFields("sub_cntry").Subtotals = _
  Array(False, False, False, False, False, False, False, False, False, False, False, False)
I tried the following two workarounds but the first will not compile and the second returns an error:
DIMENSION laSubTotals[12]
laSubTotals = .F.
WITH oExcel.PivotTables("PivotTable")
   .PivotFields("sub_cntry").SubTotals = @laSubTotals  && won't compile

   .PivotFields("sub_cntry").SubTotals( @laSubTotals) && OLE error
ENDWITH
Anyone got a solution?
Next
Reply
Map
View

Click here to load this message in the networking platform