Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Excel and VFP
Message
From
10/04/2003 06:31:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/04/2003 18:03:14
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00775795
Message ID:
00775928
Views:
11
This message has been marked as the solution to the initial question of the thread.
>
>ActiveSheet.PivotTables("PivotTable").PivotFields("title").Subtotals = Array( _
>        False, False, False, False, False, False, False, False, False, False, False, False)
>
>
>I get ole error if i specify oPivotTables.pivotFields("title").subtotals = .f.
>
>How to get the equivalent of Array(False, False, False, False, False, False, False, False, False, False, False, False) in VFP
>
>
>2. I have a pivot field title in orientation =3 && page field, how can i specify the value of the title to be say 'Programmer'
>
>I created a macro and tried it but it also fires a error,here the code
>
>use detail
>titl=detail.title
>oPivotTable.PivotFields("Title").CurrentPage=titl
>
>
>TIA

1) Use nIndex parameter of Subtotals. If you set subtotals(1) to .t. (Automatic) first array element is set to .T. and rest is set to .F. First do that to set rest to .F. then set first to .F. ie:
with ox.ActiveWorkBook.ActiveSheet.PivotTables("PivotTable")
 .PivotFields("title").Subtotals(1) = .T.
 .PivotFields("title").Subtotals(1) = .F.
endwith
2) Your detail.line might have trailing spaces. Trailing spaces are removed from pivotitems and Excel is not smart as VFP on a nonexact match.
use detail
titl=trim(detail.title)
oPivotTable.PivotFields("Title").CurrentPage=titl
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
Reply
Map
View

Click here to load this message in the networking platform